3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = range(0, 1000); $time = microtime(true); array_map(function($el) { return $el * $el; }, $a); var_dump(microtime(true) - $time); $time = microtime(true); $b = []; foreach ($a as $el) { $b[] = $el * $el; } var_dump(microtime(true) - $time);

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.3.120.0060.01015.14
7.3.110.0100.00315.06
7.3.100.0060.00614.93
7.3.90.0100.00715.02
7.3.80.0070.00714.63
7.3.70.0060.00914.98
7.3.60.0060.00915.00
7.3.50.0080.00614.88
7.3.40.0030.00914.89
7.3.30.0100.00314.95
7.3.20.0030.01016.62
7.3.10.0090.00816.58
7.3.00.0130.00316.45
7.2.240.0070.00715.26
7.2.230.0030.01214.94
7.2.220.0070.00714.89
7.2.210.0060.00915.09
7.2.200.0040.01415.23
7.2.190.0100.00714.96
7.2.180.0070.01014.97
7.2.170.0040.01415.15
7.2.160.0000.01615.11
7.2.150.0070.00716.69
7.2.140.0070.01016.73
7.2.130.0170.00716.65
7.2.120.0090.00916.73
7.2.110.0170.00716.87
7.2.100.0120.00816.76
7.2.90.0110.00716.71
7.2.80.0040.01616.88
7.2.70.0090.01016.76
7.2.60.0090.01416.83
7.2.50.0140.00717.01
7.2.40.0140.00316.83
7.2.30.0160.00816.90
7.2.20.0100.00816.79
7.2.10.0120.00916.89
7.2.00.0070.00617.68
7.1.330.0070.01015.65
7.1.320.0080.00815.99
7.1.310.0030.01215.52
7.1.300.0030.00616.04
7.1.290.0120.00315.88
7.1.280.0000.01315.58
7.1.270.0040.01215.78
7.1.260.0000.01415.65
7.1.250.0100.00715.73
7.1.70.0070.00416.95
7.1.60.0040.00717.25
7.1.50.0090.01317.00
7.1.00.0030.03322.57
7.0.200.0050.00316.89
7.0.140.0100.06721.94
7.0.60.0030.05720.08
7.0.50.0130.07017.93
7.0.40.0100.07320.40
7.0.30.0370.08020.20
7.0.20.0300.04320.17
7.0.10.0130.08320.09
7.0.00.0100.07320.20
5.6.280.0100.09321.10
5.6.210.0070.06020.98
5.6.200.0030.09018.38
5.6.190.0130.04020.60
5.6.180.0470.07320.79
5.6.170.0270.07020.59
5.6.160.0100.06320.61
5.6.150.0070.08318.45
5.6.140.0070.04318.44
5.6.130.0130.07718.43
5.6.120.0030.07321.39
5.6.110.0100.08021.30
5.6.100.0030.08721.40
5.6.90.0130.06721.27
5.6.80.0100.08020.82
5.5.350.4330.04020.81
5.5.340.0100.07718.21
5.5.330.0100.04720.47
5.5.320.0030.04320.40
5.5.310.0230.07020.37
5.5.300.0100.05318.27
5.5.290.0070.04018.18
5.5.280.0100.08020.97
5.5.270.0100.04321.05
5.5.260.0070.06321.08
5.5.250.0130.05020.79
5.5.240.0200.07020.44
5.4.450.0470.04319.54
5.4.440.0470.06719.86
5.4.430.0430.07319.62
5.4.420.0670.06019.85
5.4.410.0530.04719.40
5.4.400.0570.06719.30
5.4.390.0470.05019.32
5.4.380.0470.07019.31
5.4.370.0470.04019.21
5.4.360.0570.06719.21
5.4.350.0430.05019.43
5.4.340.0570.06719.44
5.4.320.0600.06019.53
5.4.310.0470.06019.45
5.4.300.0400.04019.34
5.4.290.0600.06019.28
5.4.280.0430.03719.16
5.4.270.0530.05319.30
5.4.260.0500.06719.29
5.4.250.0330.04019.43
5.4.240.0400.04319.45
5.4.230.0330.04019.43
5.4.220.0400.04319.34
5.4.210.0400.03319.45
5.4.200.0330.04319.34
5.4.190.0530.06019.15
5.4.180.0370.03719.29
5.4.170.0330.05019.13
5.4.160.0430.04319.26
5.4.150.0300.05019.05
5.4.140.0400.03716.70
5.4.130.0330.03716.63
5.4.120.0370.03316.81
5.4.110.0330.04016.77
5.4.100.0370.04016.66
5.4.90.0370.03316.46
5.4.80.0370.04016.65
5.4.70.0330.03716.81
5.4.60.0400.03316.49
5.4.50.0270.04016.64
5.4.40.0330.03716.59
5.4.30.0400.03016.64
5.4.20.0430.03016.51
5.4.10.0430.07016.71
5.4.00.0600.05016.12
5.3.290.0470.04314.59
5.3.280.0230.04714.61
5.3.270.0500.07014.51
5.3.260.0400.05014.65
5.3.250.0370.03714.61
5.3.240.0370.03714.53
5.3.230.0400.03714.57
5.3.220.0370.04014.79
5.3.210.0400.03014.58
5.3.200.0300.04014.48
5.3.190.0330.03714.73
5.3.180.0430.03314.61
5.3.170.0270.05014.57
5.3.160.0400.03314.64
5.3.150.0330.03714.49
5.3.140.0400.03014.49
5.3.130.0470.03014.44
5.3.120.0470.02714.52
5.3.110.0300.06014.61
5.3.100.0600.05013.96
5.3.90.0600.06314.07
5.3.80.0630.05314.10
5.3.70.0430.03714.06
5.3.60.0500.06013.93
5.3.50.0430.03313.92
5.3.40.0430.05313.98
5.3.30.0470.04013.82
5.3.20.0670.05013.85
5.3.10.0470.04313.61
5.3.00.0400.04013.64
5.2.170.0330.03011.25
5.2.160.0300.02711.23
5.2.150.0400.03711.16
5.2.140.0430.04711.08
5.2.130.0470.03710.94
5.2.120.0430.05310.94
5.2.110.0300.03010.94
5.2.100.0230.05011.15
5.2.90.0330.03711.04
5.2.80.0470.02711.03
5.2.70.0470.04011.04
5.2.60.0470.04011.06
5.2.50.0400.04711.03
5.2.40.0400.05310.88
5.2.30.0370.04010.81
5.2.20.0330.02711.01
5.2.10.0370.05710.95
5.2.00.0430.04310.76
5.1.60.0330.0309.96
5.1.50.0500.02010.00
5.1.40.0270.03010.13
5.1.30.0330.03010.23
5.1.20.0270.03010.40
5.1.10.0300.03710.19
5.1.00.0300.02710.13
5.0.50.0130.0378.60
5.0.40.0200.0338.29
5.0.30.0270.0308.19
5.0.20.0170.0378.09
5.0.10.0300.0378.15
5.0.00.0230.0578.09
4.4.90.0300.0277.88
4.4.80.0270.0277.88
4.4.70.0170.0177.88
4.4.60.0170.0137.88
4.4.50.0230.0307.88
4.4.40.0130.0307.88
4.4.30.0200.0137.88
4.4.20.0200.0377.88
4.4.10.0200.0207.88
4.4.00.0230.0477.88
4.3.110.0330.0107.88
4.3.100.0230.0137.88
4.3.90.0170.0377.88
4.3.80.0230.0307.88
4.3.70.0300.0237.88
4.3.60.0230.0237.88
4.3.50.0230.0207.88
4.3.40.0300.0237.88
4.3.30.0100.0337.88
4.3.20.0130.0207.88
4.3.10.0100.0207.88
4.3.00.0070.0277.88

preferences:
37.57 ms | 401 KiB | 5 Q