3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php // Create a simple array. $array = array(1, 2, 3, 4, 5); print_r($array); // Now delete every item, but leave the array itself intact: foreach ($array as $i => $value) { echo $array['2']; } print_r($array); // Append an item (note that the new key is 5, instead of 0). $array[] = 6; print_r($array); // Re-index: $array = array_values($array); $array[] = 7; print_r($array);

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)
5.5.20.0030.04020.09
5.5.10.0070.07320.06
5.5.00.0030.07720.08
5.4.180.0000.08319.02
5.4.170.0000.08319.11
5.4.160.0070.07319.05
5.4.150.0000.07018.99
5.4.140.0030.04716.43
5.4.130.0030.07016.45
5.4.120.0030.07016.27
5.4.110.0000.07016.42
5.4.100.0000.07316.43
5.4.90.0000.07316.34
5.4.80.0070.07316.46
5.4.70.0030.07716.41
5.4.60.0030.07016.37
5.4.50.0100.05016.48
5.4.40.0000.03716.50
5.4.30.0030.07016.31
5.4.20.0030.03316.31
5.4.10.0070.06716.31
5.4.00.0030.05315.78
5.3.270.0030.07314.45
5.3.260.0000.05314.59
5.3.250.0070.06714.53
5.3.240.0100.07014.59
5.3.230.0070.07014.52
5.3.220.0030.06014.41
5.3.210.0030.06714.41
5.3.200.0030.07314.36
5.3.190.0100.06314.49
5.3.180.0100.06714.51
5.3.170.0070.05714.48
5.3.160.0030.05714.55
5.3.150.0030.07314.54
5.3.140.0000.04314.48
5.3.130.0030.08014.48
5.3.120.0070.05714.45
5.3.110.0070.03714.54
5.3.100.0030.05713.87
5.3.90.0070.06714.01
5.3.80.0070.06313.99
5.3.70.0030.04013.94
5.3.60.0000.04013.95
5.3.50.0000.03713.91
5.3.40.0070.04013.89
5.3.30.0030.07713.88
5.3.20.0030.06313.63
5.3.10.0100.04713.58
5.3.00.0030.04013.60

preferences:
138.77 ms | 1394 KiB | 7 Q