3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $list = array ( "Peter,Griffin,Oslo,Norway", "Glenn,Quagmire,Oslo,Norway", ); foreach ($list as $line) { // fputcsv($file,explode(',',$line)); var_dump($line); var_dump(explode(',',$line)); } ?>
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0rc2
string(25) "Peter,Griffin,Oslo,Norway" array(4) { [0]=> string(5) "Peter" [1]=> string(7) "Griffin" [2]=> string(4) "Oslo" [3]=> string(6) "Norway" } string(26) "Glenn,Quagmire,Oslo,Norway" array(4) { [0]=> string(5) "Glenn" [1]=> string(8) "Quagmire" [2]=> string(4) "Oslo" [3]=> string(6) "Norway" }