3v4l.org

run code in 300+ PHP versions simultaneously
<?php $entries = []; for($i = 0; $i < 100000; $i++) { $entries[] = ['id' => $i]; } $t = microtime(true); $res = array_map(function($entry) { return $entry['id']; }, $entries); $t = microtime(true) - $t; echo 'array_map() took ' . number_format($t, 3) . ' seconds'; $t = microtime(true); $res = []; foreach($entries as $entry) { $res[] = $entry['id']; } $t = microtime(true) - $t; echo 'foreach took ' . number_format($t, 3) . ' seconds';

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.2.00.0890.03465.36
7.1.70.0030.05263.48
7.1.60.0100.07663.63
7.1.50.1170.05761.36
7.1.00.0100.11368.41
7.0.200.7910.04759.66
7.0.140.0070.11068.34
7.0.60.0300.11364.19
7.0.50.0100.07761.83
7.0.40.0200.10727.03
7.0.30.0830.11027.03
7.0.20.0570.06727.20
7.0.10.0170.12027.09
7.0.00.0130.13726.92
5.6.280.0330.18783.89
5.6.210.0330.12783.65
5.6.200.0370.19781.12
5.6.190.0170.18083.33
5.6.180.3770.13383.37
5.6.170.0700.17783.33
5.6.160.0200.21383.40
5.6.150.0500.16781.11
5.6.140.0430.19081.11
5.6.130.0330.20081.12
5.6.120.0270.18383.96
5.6.110.0170.18784.00
5.6.100.0330.19084.17
5.6.90.0400.16784.11
5.6.80.0270.16083.55
5.6.70.3200.13383.38
5.5.350.0470.16783.51
5.5.340.0170.15780.98
5.5.330.0400.19783.14
5.5.320.0500.17782.95
5.5.310.0370.13783.11
5.5.300.0300.20080.95
5.5.290.0300.20380.97
5.5.280.0370.20383.96
5.5.270.0370.19383.65
5.5.260.0470.19383.71
5.5.250.0230.20783.53
5.5.240.0370.20783.22
5.4.450.1100.16782.33
5.4.440.0300.22082.43
5.4.430.0530.23382.36
5.4.420.0500.22782.54
5.4.410.0800.21782.22
5.4.400.0570.21082.23
5.4.390.0900.20382.01
5.4.380.1370.25781.49
5.4.370.0970.24081.52
5.4.360.1100.32081.70
5.4.350.1030.31081.55
5.4.340.0800.24081.54
5.4.320.0240.15375.48
5.4.310.0180.15875.48
5.4.300.0220.16175.48
5.4.290.0320.16475.47
5.4.280.0280.17375.37
5.4.270.0200.15875.38
5.4.260.0300.16475.37
5.4.250.0230.15975.36
5.4.240.0240.16275.37
5.4.230.0220.16275.36
5.4.220.0290.15575.37
5.4.210.0300.14875.36
5.4.200.0200.16075.37
5.4.190.0180.17275.36
5.4.180.0220.17375.36
5.4.170.0370.15075.37
5.4.160.0230.16375.37
5.4.150.0300.15575.36
5.4.140.0330.15275.05
5.4.130.0260.15475.03
5.4.120.0240.15874.99
5.4.110.0290.15774.99
5.4.100.0290.15074.99
5.4.90.0250.16974.99
5.4.80.0220.16974.99
5.4.70.0210.16674.98
5.4.60.0230.16474.98
5.4.50.0340.15174.98
5.4.40.0180.17174.98
5.4.30.0280.16274.96
5.4.20.0300.15274.97
5.4.10.0350.14574.97
5.4.00.0250.15874.46
5.3.290.0030.04312.80
5.3.280.0070.03712.71
5.3.270.0030.04212.72
5.3.260.0090.03612.72
5.3.250.0050.03812.72
5.3.240.0090.03512.72
5.3.230.0070.03712.71
5.3.220.0080.03512.68
5.3.210.0070.03812.68
5.3.200.0090.03412.68
5.3.190.0040.04012.68
5.3.180.0060.03612.67
5.3.170.0050.03712.67
5.3.160.0040.03812.67
5.3.150.0080.03912.67
5.3.140.0090.03512.66
5.3.130.0060.03812.65
5.3.120.0060.03812.66
5.3.110.0080.03712.66
5.3.100.0070.03612.12
5.3.90.0090.03412.08
5.3.80.0060.03712.07
5.3.70.0090.03412.08
5.3.60.0050.03712.06
5.3.50.0060.03612.00
5.3.40.0080.03512.00
5.3.30.0040.03611.95
5.3.20.0050.03611.73
5.3.10.0050.03511.70
5.3.00.0040.03811.68
5.2.170.0030.0329.18
5.2.160.0040.0309.18
5.2.150.0070.0279.19
5.2.140.0040.0319.18
5.2.130.0040.0299.13
5.2.120.0030.0299.14
5.2.110.0080.0309.14
5.2.100.0060.0279.14
5.2.90.0080.0259.14
5.2.80.0070.0289.14
5.2.70.0050.0299.14
5.2.60.0030.0319.09
5.2.50.0030.0319.06
5.2.40.0040.0299.03
5.2.30.0050.0299.01
5.2.20.0020.0309.00
5.2.10.0060.0268.92
5.2.00.0020.0318.79
5.1.60.0060.0228.06
5.1.50.0040.0258.07
5.1.40.0040.0248.05
5.1.30.0040.0268.40
5.1.20.0030.0278.42
5.1.10.0010.0298.14
5.1.00.0030.0268.14
5.0.50.0020.0226.62
5.0.40.0020.0206.48
5.0.30.0030.0316.29
5.0.20.0030.0196.26
5.0.10.0040.0196.24
5.0.00.0040.0306.23
4.4.90.0040.0144.78
4.4.80.0030.0144.75
4.4.70.0040.0204.76
4.4.60.0030.0164.76
4.4.50.0050.0124.77
4.4.40.0030.0284.71
4.4.30.0020.0184.76
4.4.20.0050.0144.84
4.4.10.0010.0174.85
4.4.00.0020.0304.76
4.3.110.0040.0214.66
4.3.100.0020.0164.66
4.3.90.0030.0144.64
4.3.80.0020.0244.58
4.3.70.0040.0134.63
4.3.60.0030.0144.63
4.3.50.0020.0154.63
4.3.40.0010.0254.54
4.3.30.0030.0153.29
4.3.20.0030.0153.26
4.3.10.0030.0163.22
4.3.00.0070.01715.68

preferences:
40.07 ms | 400 KiB | 5 Q