3v4l.org

run code in 300+ PHP versions simultaneously
<?php function start() { $GLOBALS['start'] = microtime(true); } function stop($return=false) { $time = microtime(true) - $GLOBALS['start']; if($return) { return $time; } else { printf("\n\n%.20f seconds\n\n", $time); } } for($i=1; $i<50000; $i++) { $csv[] = ["id"=>$i, "another_id"=>1]; $db[] = ["id"=>$i+10, "another_id"=>1]; } start(); // Get items that are in CSV but not in database $new = array_diff_key(array_column($csv, null, 'id'), array_column($db, null, 'id')); // Get items that are in database but not in CSV $del = array_diff_key(array_column($db, null, 'id'), array_column($csv, null, 'id')); stop();

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)
7.4.10.0490.07558.77
7.4.00.0490.06158.71
7.3.130.0460.07358.80
7.3.120.0400.07358.79
7.3.110.0460.07058.54
7.3.100.0360.07958.77
7.3.90.0550.05758.66
7.3.80.0600.07358.69
7.3.70.0490.07058.67
7.3.60.0540.06458.75
7.3.50.0580.06958.81
7.3.40.0500.07358.81
7.3.30.0510.08058.64
7.3.20.0640.08158.85
7.3.10.0840.07658.65
7.3.00.0480.08158.64
7.2.260.0530.06458.81
7.2.250.0510.08658.58
7.2.240.0390.08058.69
7.2.230.0500.06658.90
7.2.220.0460.06658.57
7.2.210.0440.07158.84
7.2.200.0640.08158.74
7.2.190.0480.06958.71
7.2.180.0460.07358.74
7.2.170.0400.08358.83
7.2.160.0560.07158.82
7.2.150.0610.07958.83
7.2.140.0640.07358.80
7.2.130.0500.07358.73
7.2.120.0780.08958.89
7.2.110.0530.08558.89
7.2.100.0560.08058.82
7.2.90.0510.07758.76
7.2.80.0580.07958.82
7.2.70.0520.08358.81
7.2.60.0540.09058.71
7.2.50.0990.08958.75
7.2.40.0480.07158.80
7.2.30.0560.09858.93
7.2.20.0690.07358.79
7.2.10.0580.07358.83
7.2.00.0530.07858.58

preferences:
39.56 ms | 403 KiB | 5 Q