3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $info = new SplFileInfo('/usr/bin/php'); $parent_info = $info->getPathInfo(); var_dump($parent_info->getRealPath());
Output for 5.2.2 - 5.2.17, 5.3.3 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
string(8) "/usr/bin"
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.3.0 - 5.3.2
bool(false)
Output for 5.1.3 - 5.2.1
Fatal error: Call to undefined method SplFileInfo::getRealPath() in /in/NmGvj on line 4
Process exited with code 255.
Output for 5.1.2
Warning: SplFileInfo::getPathInfo(): bad type specifier while parsing parameters in /in/NmGvj on line 3 Fatal error: Call to a member function getRealPath() on a non-object in /in/NmGvj on line 4
Process exited with code 255.
Output for 5.0.0 - 5.1.1
Fatal error: Class 'SplFileInfo' not found in /in/NmGvj 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/NmGvj 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/NmGvj on line 2