VERSION
VERSION = "1.0.8"
Boris is a tiny REPL for PHP.
onStart(mixed $hook)
Add a new hook to run in the context of the REPL when it starts.
mixed | $hook | The hook is either a string of PHP code to eval(), or a Closure accepting the EvalWorker object as its first argument and the array of defined local variables in the second argument. If the hook is a callback and needs to set any local variables in the REPL's scope, it should invoke $worker->setLocal($var_name, $value) to do so. Hooks are guaranteed to run in the order they were added and the state set by each hook is available to the next hook (either through global resources, such as classes and interfaces, or through the 2nd parameter of the callback, if any local variables were set. |
** File not found : Contrived **
onFailure(mixed $hook)
Add a new hook to run in the context of the REPL when a fatal error occurs.
mixed | $hook | The hook is either a string of PHP code to eval(), or a Closure accepting the EvalWorker object as its first argument and the array of defined local variables in the second argument. If the hook is a callback and needs to set any local variables in the REPL's scope, it should invoke $worker->setLocal($var_name, $value) to do so. Hooks are guaranteed to run in the order they were added and the state set by each hook is available to the next hook (either through global resources, such as classes and interfaces, or through the 2nd parameter of the callback, if any local variables were set. |
** File not found : An **
setLocal(array|string $local, $value = null)
Set a local variable, or many local variables.
array|string | $local | |
$value |
** File not found : Setting **
** File not found : Setting **