3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $spl = new SplFileObject(__FILE__); var_dump($spl->fread(-1));
based on fSYQr
Output for 5.5.24 - 5.6.28, 7.0.0 - 7.1.0
Warning: SplFileObject::fread(): Length parameter must be greater than 0 in /in/LNt0T on line 3 bool(false)
Output for hhvm-3.10.0 - 3.12.0
Warning: fread(): Length parameter must be greater than 0 bool(false)
Output for 5.1.0 - 5.4.45
Fatal error: Call to undefined method SplFileObject::fread() in /in/LNt0T on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Class 'SplFileObject' not found in /in/LNt0T on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: splfileobject in /in/LNt0T on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: splfileobject in /in/LNt0T on line 2