Hacker News new | ask | show | jobs
by owyn 2756 days ago
Yeah, PHP supports a REPL too! I sometimes found it useful when working on mediawiki to debug issues when a full blown debugger wasn't necessary. And if you were familiar with the various internal API's it was pretty easy to do simple maintenance tasks through the REPL without needing to write a script.
1 comments

Which one do you use? I ended up rolling my own years ago and it's worked out fine (other than the fact I've never gotten readln support working), but I've noticed a proliferation of other solutions since about the release of PHP 7 and wonder if they're an improvement.
I used Boris, and the php debugger as a pretty effective shell sometimes. mediawiki had eval.php, which is apparently now shell.php

https://m.mediawiki.org/wiki/Special:MyLanguage/Manual:Shell...

Based on my experience with that I’d definitely add a shell utility to any large application I was working on.