3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $value = new stdClass(); $x = ((string)(int)$value === (string)$value && $value >= 0); var_dump($x);
Output for 7.1.0
Notice: Object of class stdClass could not be converted to int in /in/ZV0kN on line 5 Recoverable fatal error: Object of class stdClass could not be converted to string in /in/ZV0kN on line 5
Process exited with code 255.
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.14
Notice: Object of class stdClass could not be converted to int in /in/ZV0kN on line 5 Catchable fatal error: Object of class stdClass could not be converted to string in /in/ZV0kN on line 5
Process exited with code 255.
Output for 5.1.0 - 5.1.6
Notice: Object of class stdClass could not be converted to int in /in/ZV0kN on line 5 bool(false)
Output for 5.0.0 - 5.0.5
bool(true)
Output for 4.3.0 - 4.4.9
Notice: Object to string conversion in /in/ZV0kN on line 5 bool(false)