3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = new SplFileInfo('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII='); var_dump($x->openFile(), strval($x->openFile()));
Output for 5.3.22 - 5.3.29, 5.4.7 - 7.2.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) """ } string(6) "�PNG "
Output for 5.3.0 - 5.3.21, 5.4.0 - 5.4.6
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) """ } string(114) "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII="
Output for 5.2.0 - 5.2.17
object(SplFileObject)#2 (0) { } string(114) "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII="
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/YYlWN:5 Stack trace: #0 /in/YYlWN(5): SplFileInfo->openFile() #1 {main} thrown in /in/YYlWN on line 5
Process exited with code 255.
Output for 5.0.0 - 5.1.1
Fatal error: Class 'SplFileInfo' not found in /in/YYlWN 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/YYlWN 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/YYlWN on line 3