3v4l.org

run code in 300+ PHP versions simultaneously
<?php function csvToJson($fname) { //read csv headers $key = str_getcsv($fname,"1024"," "); // parse csv rows into array $json = array(); while ($row = str_getcsv($fname,"1024"," ")) { $json[] = array_combine($key, $row); } // release file handle fclose($fp); // encode array to json return json_encode($json); } $fname = "Quote Author You never know if you can actually do something against all odds until you actually do it. Abby Wambach (Soccer) Always work hard, never give up, and fight until the end because it&#39;s never really over until the whistle blows. Alex Morgan (Soccer) No matter what accomplishments you make, somebody helped you. Althea Gibson (Tennis, Golf) You can&#39;t always be the best. You have to remember that everyone makes mistakes sometimes. Aly Raisman (Gymnastics)"; echo csvToJson($fname);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0731.93265.25
8.3.50.0401.96667.05
8.3.40.0401.11049.38
8.3.30.0571.14347.54
8.3.20.0200.60450.90
8.3.10.0130.61450.90
8.3.00.0170.59550.82
8.2.180.0401.96366.52
8.2.170.0371.17147.56
8.2.160.0401.26649.22
8.2.150.0300.61448.10
8.2.140.0200.61049.91
8.2.130.0130.60648.27
8.2.120.0070.61648.54
8.2.110.0170.64046.73
8.1.280.0531.95568.86
8.1.270.0100.58451.17
8.1.260.0070.59449.71
8.1.250.0200.63551.51
8.1.240.0070.57046.45
7.4.100.0672.35146.89
7.4.90.0692.38251.95
7.3.220.0752.39143.84

preferences:
49.14 ms | 401 KiB | 5 Q