3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<html> <body> <?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); } ?> </body> </html>
Output for 4.3.2 - 4.3.10, 4.4.0 - 7.2.0
<html> <body> Warning: file(prod.txt): failed to open stream: No such file or directory in /in/pmvLU on line 8 Warning: Invalid argument supplied for foreach() in /in/pmvLU on line 9 </body> </html>
Output for 4.3.11
<html> <body> Warning: file(prod.txt): failed to open stream: No such file or directory in /in/pmvLU on line 8 </body> </html>
Output for 4.3.0 - 4.3.1
<html> <body> Warning: file(prod.txt) [http://www.php.net/function.file]: failed to create stream: No such file or directory in /in/pmvLU on line 8 Warning: Invalid argument supplied for foreach() in /in/pmvLU on line 9 </body> </html>