3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array("one", "two", "three", "four"); $b = array("one", "two", "three", "four"); foreach ($a as &$e) { $e = $e . mt_rand(0,10); } foreach ($b as $e) { $e = $e . mt_rand(0,10); } foreach ($a as $e) { echo $e . PHP_EOL; } foreach ($b as $e) { echo $e . PHP_EOL; }

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.00.0030.01314.90
7.3.120.0070.01315.17
7.3.110.0060.01014.64
7.3.100.0100.00714.90
7.3.90.0030.01014.92
7.3.80.0050.00514.67
7.3.70.0070.00714.80
7.3.60.0100.00714.63
7.3.50.0080.00814.85
7.3.40.0000.00914.95
7.3.30.0070.00714.85
7.3.20.0070.01016.72
7.3.10.0000.01516.79
7.3.00.0030.01016.46
7.2.250.0060.00914.98
7.2.240.0070.01114.98
7.2.230.0030.01314.96
7.2.220.0090.00014.81
7.2.210.0080.00314.81
7.2.200.0070.00714.70
7.2.190.0000.00914.89
7.2.180.0060.00614.94
7.2.170.0060.00914.75
7.2.130.0000.01216.64
7.2.120.0100.00316.98
7.2.110.0100.00016.52
7.2.100.0030.00916.81
7.2.90.0030.00916.98
7.2.80.0090.00316.87
7.2.70.0100.00017.06
7.2.60.0110.00316.72
7.2.50.0100.00716.58
7.2.40.0110.00316.72
7.2.30.0090.00016.95
7.2.20.0060.00317.02
7.2.10.0070.00717.03
7.2.00.0080.00618.14
7.1.330.0040.01415.93
7.1.320.0000.01315.59
7.1.310.0050.00515.65
7.1.300.0070.00315.83
7.1.290.0070.00715.70
7.1.280.0110.00315.93
7.1.270.0000.01415.72
7.1.260.0080.00815.95
7.1.250.0080.00015.86
7.1.240.0100.00315.90
7.1.230.0000.01115.67
7.1.220.0030.00715.76
7.1.210.0040.00415.46
7.1.200.0000.01115.81
7.1.190.0040.00715.80
7.1.180.0000.01115.70
7.1.170.0060.00315.46
7.1.160.0030.01015.81
7.1.150.0070.00715.82
7.1.140.0050.00515.71
7.1.130.0030.01015.66
7.1.120.0030.00715.89
7.1.110.0100.00315.74
7.1.100.0090.00316.02
7.1.90.0060.00615.75
7.1.80.0000.01015.53
7.1.70.0050.00516.32
7.1.60.0020.00917.73
7.1.50.0040.00916.28
7.1.40.0030.00915.75
7.1.30.0030.00715.67
7.1.20.0100.00315.43
7.1.10.0030.01015.29
7.1.00.0070.03719.13
7.0.330.0000.01215.30
7.0.320.0070.00715.43
7.0.310.0060.00315.34
7.0.300.0030.00615.38
7.0.290.0030.00615.57
7.0.280.0030.01015.36
7.0.270.0070.00315.41
7.0.260.0060.00915.02
7.0.250.0070.00715.34
7.0.240.0070.00015.20
7.0.230.0060.00615.41
7.0.220.0080.00315.30
7.0.210.0000.01115.13
7.0.200.0160.00415.11
7.0.190.0040.01115.14
7.0.180.0030.01015.38
7.0.170.0070.00315.13
7.0.160.0070.00615.02
7.0.150.0080.00315.37
7.0.140.0100.00015.21
7.0.130.0000.01315.60
7.0.120.0070.00715.54
7.0.110.0100.00315.52
7.0.100.0610.03817.51
7.0.90.0370.03517.61
7.0.80.0630.03517.67
7.0.70.0120.04417.71
7.0.60.0780.04317.77
7.0.50.0680.04617.92
7.0.40.0900.04016.88
7.0.30.0550.03816.74
7.0.20.0830.04516.82
7.0.10.0490.03416.75
7.0.00.0780.04116.96
5.6.380.0000.01514.27
5.6.370.0070.00714.50
5.6.360.0040.00414.51
5.6.350.0030.01214.23
5.6.340.0120.00014.21
5.6.330.0080.00414.52
5.6.320.0060.00914.60
5.6.310.0080.00414.29
5.6.300.0030.00614.68
5.6.290.0030.00614.11
5.6.280.0090.00614.23
5.6.270.0060.00914.11
5.6.260.0090.00614.35
5.6.250.0080.03917.57
5.6.240.0150.03517.48
5.6.230.0190.03117.52
5.6.220.0100.03817.52
5.6.210.0150.04217.58
5.6.200.0130.04117.82
5.6.190.0150.03917.65
5.6.180.0160.03817.72
5.6.170.0100.03617.63
5.6.160.0150.04117.66
5.6.150.0090.04117.70
5.6.140.0150.04017.71
5.6.130.0100.04917.58
5.6.120.0120.03917.81
5.6.110.0160.04517.65
5.6.100.0100.04717.58
5.6.90.0070.04917.72
5.6.80.0170.03717.28
5.6.70.0180.02717.29
5.6.60.0080.04317.14
5.6.50.0080.04017.37
5.6.40.0080.04417.37
5.6.30.0180.03017.35
5.6.20.0120.04517.32
5.6.10.0090.04117.28
5.6.00.0100.03217.39

preferences:
44 ms | 401 KiB | 5 Q