3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = <<<CSV AZONOSÍTÓ;KATEGÓRIA;BÉR;LEÍRÁS 001;IT1;1000;Programozás 002;IT2;2000;Farmerkodás 003;IT3;3000;Valami CSV; $file = "data://text/plain;base64," . base64_encode($content); $tomb = []; if (($handle = fopen($file, "r")) !== FALSE) { while (($row = fgetcsv($handle, 1000, ";")) !== FALSE) { $tomb[] = $row; } fclose($handle); } print_r($tomb);
Output for 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.26, 8.1.0 - 8.1.13
Array ( [0] => Array ( [0] => AZONOSÍTÓ [1] => KATEGÓRIA [2] => BÉR [3] => LEÍRÁS ) [1] => Array ( [0] => 001 [1] => IT1 [2] => 1000 [3] => Programozás ) [2] => Array ( [0] => 002 [1] => IT2 [2] => 2000 [3] => Farmerkodás ) [3] => Array ( [0] => 003 [1] => IT3 [2] => 3000 [3] => Valami ) )

preferences:
66.84 ms | 411 KiB | 5 Q