3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = <<<DATA 1363168337,21320,17408,5,"nice product " 1363168371,21180,17134,4,"A gorgeous shirt but had to return as a tight fit so looked a little small. Unfortunately they didn't have size large. " 1363168572,22509,15248,5,Fine! 1363168572,22509,16314,5,Fine! 1363168613,21351,17870,5,"The product was a gift so cannot review the item" 1363168950,21930,16020,4,"Product lived up to expectations and was as thought.\n\nProduct is worn as casual top" 1363168950,21930,17294,4,"Product lived up to expectations and was as thought.\n\nProduct is worn as casual top" 1363168988,21937,14733,4,"Product is good " DATA; $fp = fopen('php://memory', 'w+'); fwrite($fp, $data); rewind($fp); while ($line = fgetcsv($fp)) { var_dump($line); }
Output for 5.1.4 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.35, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
array(5) { [0]=> string(10) "1363168337" [1]=> string(5) "21320" [2]=> string(5) "17408" [3]=> string(1) "5" [4]=> string(13) "nice product " } array(5) { [0]=> string(10) "1363168371" [1]=> string(5) "21180" [2]=> string(5) "17134" [3]=> string(1) "4" [4]=> string(119) "A gorgeous shirt but had to return as a tight fit so looked a little small. Unfortunately they didn't have size large. " } array(5) { [0]=> string(10) "1363168572" [1]=> string(5) "22509" [2]=> string(5) "15248" [3]=> string(1) "5" [4]=> string(5) "Fine!" } array(5) { [0]=> string(10) "1363168572" [1]=> string(5) "22509" [2]=> string(5) "16314" [3]=> string(1) "5" [4]=> string(5) "Fine!" } array(5) { [0]=> string(10) "1363168613" [1]=> string(5) "21351" [2]=> string(5) "17870" [3]=> string(1) "5" [4]=> string(48) "The product was a gift so cannot review the item" } array(5) { [0]=> string(10) "1363168950" [1]=> string(5) "21930" [2]=> string(5) "16020" [3]=> string(1) "4" [4]=> string(83) "Product lived up to expectations and was as thought. Product is worn as casual top" } array(5) { [0]=> string(10) "1363168950" [1]=> string(5) "21930" [2]=> string(5) "17294" [3]=> string(1) "4" [4]=> string(83) "Product lived up to expectations and was as thought. Product is worn as casual top" } array(5) { [0]=> string(10) "1363168988" [1]=> string(5) "21937" [2]=> string(5) "14733" [3]=> string(1) "4" [4]=> string(16) "Product is good " }
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.1, 5.1.3
Warning: fopen(php://memory): failed to open stream: Inappropriate ioctl for device in /in/BcEA0 on line 14 Warning: fwrite(): supplied argument is not a valid stream resource in /in/BcEA0 on line 15 Warning: rewind(): supplied argument is not a valid stream resource in /in/BcEA0 on line 16 Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /in/BcEA0 on line 17
Output for 5.1.2
Warning: fopen(php://memory): failed to open stream: Inappropriate ioctl for device in /in/BcEA0 on line 15 Warning: fwrite(): supplied argument is not a valid stream resource in /in/BcEA0 on line 16 Warning: rewind(): supplied argument is not a valid stream resource in /in/BcEA0 on line 17 Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /in/BcEA0 on line 18
Output for 4.3.3 - 4.3.11, 4.4.0 - 4.4.1, 4.4.3 - 4.4.9
Warning: fopen(php://memory): failed to open stream: Success in /in/BcEA0 on line 14 Warning: fwrite(): supplied argument is not a valid stream resource in /in/BcEA0 on line 15 Warning: rewind(): supplied argument is not a valid stream resource in /in/BcEA0 on line 16 Warning: Wrong parameter count for fgetcsv() in /in/BcEA0 on line 17
Output for 4.4.2
Warning: fopen(php://memory): failed to open stream: Success in /in/BcEA0 on line 15 Warning: fwrite(): supplied argument is not a valid stream resource in /in/BcEA0 on line 16 Warning: rewind(): supplied argument is not a valid stream resource in /in/BcEA0 on line 17 Warning: Wrong parameter count for fgetcsv() in /in/BcEA0 on line 18
Output for 4.3.2
Warning: fopen(php://memory): failed to open stream: Inappropriate ioctl for device in /in/BcEA0 on line 14 Warning: fwrite(): supplied argument is not a valid stream resource in /in/BcEA0 on line 15 Warning: rewind(): supplied argument is not a valid stream resource in /in/BcEA0 on line 16 Warning: Wrong parameter count for fgetcsv() in /in/BcEA0 on line 17
Output for 4.3.0 - 4.3.1
Warning: fopen(php://memory) [http://www.php.net/function.fopen]: failed to create stream: Inappropriate ioctl for device in /in/BcEA0 on line 14 Warning: fwrite(): supplied argument is not a valid stream resource in /in/BcEA0 on line 15 Warning: rewind(): supplied argument is not a valid stream resource in /in/BcEA0 on line 16 Warning: Wrong parameter count for fgetcsv() in /in/BcEA0 on line 17

preferences:
306.62 ms | 402 KiB | 386 Q