3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = new SplFileInfo('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII='); var_dump($x->openFile());
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
object(SplFileObject)#2 (5) { ["pathName":"SplFileInfo":private]=> string(114) "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=" ["fileName":"SplFileInfo":private]=> string(103) "png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=" ["openMode":"SplFileObject":private]=> string(1) "r" ["delimiter":"SplFileObject":private]=> string(1) "," ["enclosure":"SplFileObject":private]=> string(1) """ }
Output for hhvm-3.10.0 - 3.12.0
object(SplFileObject)#2 (12) { ["delimiter":"SplFileObject":private]=> string(1) "," ["enclosure":"SplFileObject":private]=> string(1) """ ["escape":"SplFileObject":private]=> string(1) "\" ["flags":"SplFileObject":private]=> NULL ["filename":"SplFileObject":private]=> string(114) "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=" ["maxLineLen":"SplFileObject":private]=> int(0) ["currentLineNum":"SplFileObject":private]=> int(0) ["rsrc":"SplFileObject":private]=> resource(4) of type (stream) ["currentLine":"SplFileObject":private]=> bool(false) ["fileName":"SplFileInfo":private]=> string(114) "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=" ["fileClass":"SplFileInfo":private]=> string(13) "SplFileObject" ["infoClass":"SplFileInfo":private]=> string(11) "SplFileInfo" }
Output for 5.2.0 - 5.2.17
object(SplFileObject)#2 (0) { }
Output for 5.1.2 - 5.1.6
Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::openFile(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=): failed to open stream: No such file or directory' in /in/WDkoj:5 Stack trace: #0 /in/WDkoj(5): SplFileInfo->openFile() #1 {main} thrown in /in/WDkoj on line 5
Process exited with code 255.
Output for 5.0.0 - 5.1.1
Fatal error: Class 'SplFileInfo' not found in /in/WDkoj on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: splfileinfo in /in/WDkoj on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: splfileinfo in /in/WDkoj on line 3