I’m guessing you got to this page because you like PHP, and you like testing without creating entire directory structures or using php -r ”;.
Well, me too. That’s why I went out trying to find a tool that could help me with exactly that. One problem! There were none. And the ones that I did find also did not work the way I wanted them to. They were either online, too bloated, or required ftp access.
So, I built one. Yes, yes I did. You can find the code here: https://github.com/RWOverdijk/SxPhandbox
Installation should be pretty straight forward, as explained in the readme.