3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data=array(); $Inputfile = file("prod.txt"); foreach ($Inputfile as $line){ $pieces = explode(";", $line); echo $pieces[0]; echo $pieces[1]; echo $pieces[2]; echo $pieces[3]; //print_r($line); } ?>
Output for 4.3.2 - 4.3.10, 4.4.0 - 7.1.0
Warning: file(prod.txt): failed to open stream: No such file or directory in /in/Y9Jer on line 4 Warning: Invalid argument supplied for foreach() in /in/Y9Jer on line 5
Output for 4.3.11
Warning: file(prod.txt): failed to open stream: No such file or directory in /in/Y9Jer on line 4
Output for 4.3.0 - 4.3.1
Warning: file(prod.txt) [http://www.php.net/function.file]: failed to create stream: No such file or directory in /in/Y9Jer on line 4 Warning: Invalid argument supplied for foreach() in /in/Y9Jer on line 5