3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php 3 $list = array ( 4 array('aaa', 'bbb', 'ccc', 'dddd'), 5 array('123', '456', '789'), 6 array('"aaa"', '"bbb"') 7 ); 8 $fp = fopen("file.csv", "X+"); 9 foreach ($list as $fields) { 10 fputcsv($fp, $fields); 11 } 12 fclose($fp); 13 ?>
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected '$list' (T_VARIABLE) in /in/AjpYj on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/AjpYj on line 2
Process exited with code 255.