3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $r = fopen('/tmp/1', 'w'); var_dump((object) 0); var_dump($r); var_dump(NULL); var_dump(false); var_dump(0); var_dump(''); var_dump(0.0); var_dump(array());
based on v4e0s
Output for 5.2.3 - 5.6.30, 7.0.0 - 7.2.0
object(stdClass)#1 (1) { ["scalar"]=> int(0) } resource(5) of type (stream) NULL bool(false) int(0) string(0) "" float(0) array(0) { }
Output for hhvm-3.10.1 - 3.17.3
object(stdClass)#1 (1) { ["scalar"]=> int(0) } resource(4) of type (stream) NULL bool(false) int(0) string(0) "" float(0) array(0) { }
Output for 5.0.0 - 5.2.2
object(stdClass)#1 (1) { ["scalar"]=> int(0) } resource(2) of type (stream) NULL bool(false) int(0) string(0) "" float(0) array(0) { }
Output for 4.3.0 - 4.4.9
object(stdClass)(1) { ["scalar"]=> int(0) } resource(1) of type (stream) NULL bool(false) int(0) string(0) "" float(0) array(0) { }