davidcole1340/reactsh

ReactPHP REPL

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

This package is auto-updated.

Last update: 2024-10-08 06:13:59 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