davidcole1340/reactsh

ReactPHP REPL

v0.0.3 2022-03-08 00:43 UTC

This package is auto-updated.

Last update: 2024-11-08 06:20:25 UTC


README

ReactPHP event loop REPL. Inspired by PsySH but doesn't block any event loop.

Usage

$shell = new Shell();

$shell->run(get_defined_vars());

or

$loop = ...;
$yourOtherProcess = new OtherProcess($loop);
$shell = new Shell($loop);

$yourOtherProcess->on('ready', function () use ($shell) {
    $shell->setContext(get_defined_vars());
});

$loop->run();

License

MIT License. See LICENSE.

Credits