3v4l.org

run code in 300+ PHP versions simultaneously
<?php $paths = array( '/var/log', '/var/log/apache2', ); echo ini_get("error_log"); exit; for ($paths as $p) { $file = file("{$p}/error_log"); echo $p . ":"; echo count($file).PHP_EOL; echo end($file).PHP_EOL; }
Output for 5.4.0 - 5.4.22, 5.5.0 - 5.5.6
Parse error: syntax error, unexpected 'as' (T_AS), expecting ';' in /in/FNq77 on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_AS, expecting ';' in /in/FNq77 on line 12
Process exited with code 255.

preferences:
180.55 ms | 1395 KiB | 65 Q