3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = <<<'EOD' Name1 Name2 Name3 EOD; $filename = tempnam('/tmp', 'foo.txt'); $handle = fopen($filename, 'w'); fwrite($handle, $content); $arrayX = file( $filename FILE_IGNORE_NEW_LINES ); var_dump($arrayX);
Output for 7.0.0 - 7.0.1
Parse error: syntax error, unexpected 'FILE_IGNORE_NEW_LINES' (T_STRING), expecting ',' or ')' in /in/66vaf on line 15
Process exited with code 255.
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
Parse error: syntax error, unexpected 'FILE_IGNORE_NEW_LINES' (T_STRING) in /in/66vaf on line 15
Process exited with code 255.

preferences:
172.84 ms | 1395 KiB | 25 Q