3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php ini_set('auto_detect_line_endings', 1); $data = <<<EOT "program_name","merchant_id","code","description","url","start_date","end_date","region","Date_Added","exclusive" "Store1","01","RAWFOOD20","£20 off £90 spend on Veg","http://www.site.com/ ","2013-07-04 00:00:00","2013-10-31 23:59:59","GB","2013-07-04 01:00:00","No" "Store1","01","RAWFOOD0","£10 off £60 spend on Milk","http://www.site.com/ ","2013-07-04 00:00:00","2013-10-31 23:59:59","GB","2013-07-04 01:00:00","No"' EOT; $parse = str_getcsv($data); var_dump($parse);
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(28) { [0]=> string(12) "program_name" [1]=> string(11) "merchant_id" [2]=> string(4) "code" [3]=> string(11) "description" [4]=> string(3) "url" [5]=> string(10) "start_date" [6]=> string(8) "end_date" [7]=> string(6) "region" [8]=> string(10) "Date_Added" [9]=> string(18) "exclusive "Store1"" [10]=> string(2) "01" [11]=> string(9) "RAWFOOD20" [12]=> string(26) "£20 off £90 spend on Veg" [13]=> string(21) "http://www.site.com/ " [14]=> string(19) "2013-07-04 00:00:00" [15]=> string(19) "2013-10-31 23:59:59" [16]=> string(2) "GB" [17]=> string(19) "2013-07-04 01:00:00" [18]=> string(11) "No "Store1"" [19]=> string(2) "01" [20]=> string(8) "RAWFOOD0" [21]=> string(27) "£10 off £60 spend on Milk" [22]=> string(21) "http://www.site.com/ " [23]=> string(19) "2013-07-04 00:00:00" [24]=> string(19) "2013-10-31 23:59:59" [25]=> string(2) "GB" [26]=> string(19) "2013-07-04 01:00:00" [27]=> string(3) "No'" }
Output for 5.0.0 - 5.1.1, 5.1.3 - 5.2.17
Fatal error: Call to undefined function str_getcsv() in /in/dJJuX on line 9
Process exited with code 255.
Output for 5.1.2
Fatal error: Call to undefined function str_getcsv() in /in/dJJuX on line 10
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: str_getcsv() in /in/dJJuX on line 9
Process exited with code 255.
Output for 4.3.2 - 4.4.1, 4.4.3 - 4.4.4
Fatal error: Call to undefined function: str_getcsv() in /in/dJJuX on line 9
Process exited with code 255.
Output for 4.4.2
Fatal error: Call to undefined function: str_getcsv() in /in/dJJuX on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: str_getcsv() in /in/dJJuX on line 9