3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class x { function __tostring() { return 'foo'; } } $x = new x; var_dump(is_string($x), is_string("$x"));
Output for 5.6.0 - 7.3.0rc4
bool(false) bool(true)