There's Simplytest.me, but that's really for testing existing module to see if you like them (e.g. never used Panels before, select Panels from the list and hit Launch Sandbox to give it a go).
You could set up a test site with Devel and hit devel/php. However this isn't really any different from running a local sandbox site and doing the same thing.
Apart from that, I've not seen anything like what you're looking for. Sorry :(
I am not familiar with any public accessible online version, but if you set up a local sandbox install of Drupal and enable the core PHP filter you basically have that.