3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $fileobject = new SplFileObject(__FILE__); $fileobject->setMaxLineLen(3); echo $fileobject->getCurrentLine();
Output for 5.5.27 - 5.5.38, 5.6.11 - 7.1.0
<?p
Output for 5.1.3 - 5.5.26, 5.6.0 - 5.6.10
<?
Output for 5.1.0 - 5.1.2
<?php
Output for 5.0.0 - 5.0.5
Fatal error: Class 'SplFileObject' not found in /in/sUkX6 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/sUkX6 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/sUkX6 on line 2