3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $key = 'C:\Root/Home/Dir/Example'."\0".'Null'."\n".'NL\Bar'; $resource = fopen('/foo/bar.txt', "r"); var_dump(get_type($resource)); $resource = fopen($key, "r");
based on veqhY
Output for 7.0.0 - 7.2.0
Warning: fopen(/foo/bar.txt): failed to open stream: No such file or directory in /in/IMrhc on line 5 Fatal error: Uncaught Error: Call to undefined function get_type() in /in/IMrhc:6 Stack trace: #0 {main} thrown in /in/IMrhc on line 6
Process exited with code 255.
Output for 5.4.0 - 5.6.26
Warning: fopen(/foo/bar.txt): failed to open stream: No such file or directory in /in/IMrhc on line 5 Fatal error: Call to undefined function get_type() in /in/IMrhc on line 6
Process exited with code 255.