3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo extends \SplFileInfo {} $foo = new Foo('.'); var_dump(!$foo);
Output for 5.5.21 - 5.5.37, 5.6.5 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
bool(false)
Output for 5.3.0 - 5.5.20, 5.6.0 - 5.6.4
Catchable fatal error: Object of class Foo could not be converted to boolean in /in/JvQWp on line 6
Process exited with code 255.
Output for 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/JvQWp on line 4 Catchable fatal error: Object of class Foo could not be converted to boolean in /in/JvQWp on line 6
Process exited with code 255.
Output for 5.1.2 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/JvQWp on line 4 bool(false)
Output for 5.0.0 - 5.1.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/JvQWp on line 4 Fatal error: Class 'SplFileInfo' not found in /in/JvQWp on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/JvQWp on line 4 Fatal error: Class foo: Cannot inherit from undefined class splfileinfo in /in/JvQWp on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/JvQWp on line 4 Fatal error: Class foo: Cannot inherit from undefined class splfileinfo in /in/JvQWp on line 4