3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class MyTest { public function __toString() { return 'string'; } } echo (string) new MyTest();
based on Rb8LC
Output for 5.4.13 - 7.3.0alpha1
string