3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //file_put_contents("php://filter/write=string.toupper/resource=/tmp/test/example.txt","Hello World"); foreach(new GlobIterator('/tmp/test/*', FilesystemIterator::SKIP_DOTS) as $file) { echo $file.PHP_EOL; //var_dump(file_get_contents($file)); }
Output for 5.3.29, 5.4.28 - 5.4.45, 5.5.27 - 5.5.28, 5.5.30 - 5.5.35, 5.6.11 - 5.6.12, 5.6.14 - 5.6.19, 5.6.28, hhvm-3.10.0, 7.0.0 - 7.0.3, 7.0.14 - 7.1.0
Output for 5.5.24 - 5.5.26, 5.6.8 - 5.6.9, 5.6.20, hhvm-3.12.0, 7.0.6
/tmp/test/example.txt /tmp/test/file1.php /tmp/test/folder /tmp/test/mydir
Output for 5.5.29, 5.6.10, 5.6.13, 5.6.21, 7.0.4 - 7.0.5
/tmp/test/mydir
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.27
/tmp/test/example.txt
Output for 5.0.0 - 5.2.17
Fatal error: Class 'GlobIterator' not found in /in/OoekQ on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ')', expecting '(' in /in/OoekQ on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected ')', expecting '(' in /in/OoekQ on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/OoekQ on line 3
Process exited with code 255.