I know exactly what you mean. I missed Pry after moving to PHP as well. So far PsySH looks like the best REPL for PHP that is the most like Pry. It has reflection, so you can use commands like ls
to evaluate the variables, constants, classes, etc. It has a help command, similar to Pry's show-doc
that allows you to read documentation on functions or object properties. You can even view the source of any object, just like Pry's show-source
command. Also debugging:
"PsySH can be used as an interactive debugger, much like JavaScript's debugger statement, saving you from endless var_dump() and die() iterations. Just drop this line in where you'd like to have a breakpoint:
\Psy\Shell::debug(get_defined_vars());"
Boris is also another good REPL for PHP that is similar to Pry.