3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //$uri='http://www.yodlecareers.com/puzzles/triangle.txt'; $uri='input.txt'; //$file = fopen($uri,'r'); //var_dump($file);die; $rows = file($uri, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); echo count($rows),'<br>'; var_dump($rows[4]);
Output for 5.0.0 - 7.1.0
Warning: file(input.txt): failed to open stream: No such file or directory in /in/XMpc8 on line 9 1<br>NULL
Output for 4.3.2 - 4.4.9
Notice: Use of undefined constant FILE_IGNORE_NEW_LINES - assumed 'FILE_IGNORE_NEW_LINES' in /in/XMpc8 on line 9 Notice: Use of undefined constant FILE_SKIP_EMPTY_LINES - assumed 'FILE_SKIP_EMPTY_LINES' in /in/XMpc8 on line 9 Warning: file(input.txt): failed to open stream: No such file or directory in /in/XMpc8 on line 9 1<br>NULL
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant FILE_IGNORE_NEW_LINES - assumed 'FILE_IGNORE_NEW_LINES' in /in/XMpc8 on line 9 Notice: Use of undefined constant FILE_SKIP_EMPTY_LINES - assumed 'FILE_SKIP_EMPTY_LINES' in /in/XMpc8 on line 9 Warning: file(input.txt) [http://www.php.net/function.file]: failed to create stream: No such file or directory in /in/XMpc8 on line 9 1<br>NULL