3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump((bool) new SplFileInfo('.'));
Output for 5.1.2 - 5.1.6, 5.5.21 - 5.5.38, 5.6.5 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
bool(true)
Output for 5.2.0 - 5.5.20, 5.6.0 - 5.6.4
Catchable fatal error: Object of class SplFileInfo could not be converted to boolean in /in/4Wjfv on line 2
Process exited with code 255.
Output for 5.0.0 - 5.1.1
Fatal error: Class 'SplFileInfo' not found in /in/4Wjfv on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: splfileinfo in /in/4Wjfv on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: splfileinfo in /in/4Wjfv on line 2