3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = 'test,58597E68,abc,"58597E68",test,123,"test"'; echo 'str_getcsv():'.PHP_EOL; var_dump(str_getcsv($data)); echo PHP_EOL.'fgetcsv():'.PHP_EOL; $tmpfname = tempnam('/tmp', 'foo'); file_put_contents($tmpfname, $data); $row = 1; if (($handle = fopen($tmpfname, "r")) !== FALSE) { while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { var_dump($data); print_r($data); } fclose($handle); } unlink($tmpfname);
Output for git.master, git.master_jit, rfc.property-hooks
str_getcsv(): array(7) { [0]=> string(4) "test" [1]=> string(8) "58597E68" [2]=> string(3) "abc" [3]=> string(8) "58597E68" [4]=> string(4) "test" [5]=> string(3) "123" [6]=> string(4) "test" } fgetcsv(): array(7) { [0]=> string(4) "test" [1]=> string(8) "58597E68" [2]=> string(3) "abc" [3]=> string(8) "58597E68" [4]=> string(4) "test" [5]=> string(3) "123" [6]=> string(4) "test" } Array ( [0] => test [1] => 58597E68 [2] => abc [3] => 58597E68 [4] => test [5] => 123 [6] => test )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
30.77 ms | 402 KiB | 8 Q