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 number_format($t, 4) . 's / array_map()'; $t = microtime(true); $res = []; foreach($entries as $entry) { $res[] = $entry['id']; } $t = microtime(true) - $t; echo "\n"; echo number_format($t, 4) . 's / foreach';

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.0400.06958.93
7.3.120.0310.07659.15
7.3.110.0460.06359.13
7.3.100.0260.04959.08
7.3.90.0160.05258.98
7.3.80.0270.04858.91
7.3.70.0300.03959.10
7.3.60.0370.02759.08
7.3.50.0220.04558.98
7.3.40.0170.04459.08
7.3.30.0240.03758.71
7.3.20.0160.04062.64
7.3.10.0290.03262.68
7.3.00.1850.04262.65
7.2.250.0400.07358.96
7.2.240.0370.07759.31
7.2.230.0270.05859.15
7.2.220.0290.04659.10
7.2.210.0240.05259.21
7.2.200.0130.06358.96
7.2.190.0260.04959.25
7.2.180.0330.03959.26
7.2.170.0100.05559.34
7.2.00.0360.04365.81
7.1.330.0400.03561.77
7.1.320.0320.04461.68
7.1.310.0300.04361.90
7.1.300.0230.05262.15
7.1.290.0270.05361.85
7.1.280.0240.04962.06
7.1.270.0130.06061.54
7.1.260.0430.05462.12
7.1.70.0070.03763.06
7.1.60.0210.06563.57
7.1.50.0480.01933.08
7.1.00.0170.10368.59
7.0.200.1320.02659.38
7.0.140.0100.10768.21
7.0.60.0130.11064.22
7.0.50.0330.10362.01
7.0.40.0170.12727.05
7.0.30.0570.12027.10
7.0.20.0670.10327.20
7.0.10.0130.12327.05
7.0.00.0230.08027.13
5.6.280.0300.19383.89
5.6.210.0430.18383.50
5.6.200.0470.18781.08
5.6.190.0430.21783.34
5.6.180.3870.14783.37
5.6.170.0570.20083.33
5.6.160.0200.17383.31
5.6.150.0400.19781.11
5.6.140.0230.20081.14
5.6.130.0200.18081.20
5.6.120.0230.21383.88
5.6.110.0230.20784.02
5.6.100.0230.20383.87
5.6.90.0370.22383.98
5.6.80.0170.20783.39
5.6.70.4870.15383.30
5.5.350.0400.19783.30
5.5.340.0370.20081.02
5.5.330.0200.21383.14
5.5.320.0600.18782.93
5.5.310.0700.16383.13
5.5.300.0170.14381.01
5.5.290.0200.17080.98
5.5.280.0300.19783.95
5.5.270.0200.14783.82
5.5.260.0370.14383.73
5.5.250.0370.20783.54
5.5.240.0470.14383.11
5.4.450.0970.16382.23
5.4.440.0600.21082.46
5.4.430.0900.24782.11
5.4.420.0800.21082.47
5.4.410.0500.19782.34
5.4.400.0670.21381.98
5.4.390.1200.19082.00
5.4.380.0900.24781.70
5.4.370.0930.25781.68
5.4.360.1570.25381.49
5.4.350.0800.29081.70
5.4.340.0970.25381.75
5.4.320.0250.14775.48
5.4.310.0300.15075.48
5.4.300.0230.15775.48
5.4.290.0240.15075.47
5.4.280.0230.15375.37
5.4.270.0260.15875.37
5.4.260.0250.15475.37
5.4.250.0210.16075.37
5.4.240.0240.15075.37
5.4.230.0250.15275.36
5.4.220.0250.14875.37
5.4.210.0270.14375.36
5.4.200.0330.15775.36
5.4.190.0290.15575.36
5.4.180.0290.16575.36
5.4.170.0310.14775.38
5.4.160.0340.15075.37
5.4.150.0260.15275.36
5.4.140.0220.16375.05
5.4.130.0310.18175.04
5.4.120.0230.16075.00
5.4.110.0300.14874.99
5.4.100.0290.14674.99
5.4.90.0320.17974.99
5.4.80.0250.15874.98
5.4.70.0240.15374.98
5.4.60.0270.16774.99
5.4.50.0250.14974.99
5.4.40.0350.14874.98
5.4.30.0240.15074.97
5.4.20.0260.14774.97
5.4.10.0180.15974.97
5.4.00.0260.16074.46
5.3.290.0090.04712.80
5.3.280.0040.03912.71
5.3.270.0080.03712.72
5.3.260.0060.03912.72
5.3.250.0080.03512.72
5.3.240.0050.03712.72
5.3.230.0080.03512.71
5.3.220.0030.04012.68
5.3.210.0080.05112.68
5.3.200.0080.03512.68
5.3.190.0030.03912.68
5.3.180.0070.03412.67
5.3.170.0030.03912.66
5.3.160.0080.03412.67
5.3.150.0060.03712.67
5.3.140.0070.03812.66
5.3.130.0040.03912.66
5.3.120.0070.03612.66
5.3.110.0040.04012.66
5.3.100.0050.04112.12
5.3.90.0060.03512.09
5.3.80.0020.04112.07
5.3.70.0090.03412.08
5.3.60.0050.03612.06
5.3.50.0080.03412.00
5.3.40.0050.03912.00
5.3.30.0050.03611.95
5.3.20.0070.03411.72
5.3.10.0060.03411.70
5.3.00.0070.03511.68
5.2.170.0060.0359.18
5.2.160.0030.0359.18
5.2.150.0060.0299.18
5.2.140.0030.0329.18
5.2.130.0030.0319.14
5.2.120.0040.0299.14
5.2.110.0050.0289.14
5.2.100.0030.0319.14
5.2.90.0030.0329.14
5.2.80.0050.0299.14
5.2.70.0080.0269.14
5.2.60.0090.0259.09
5.2.50.0050.0299.06
5.2.40.0040.0299.04
5.2.30.0030.0319.02
5.2.20.0040.0299.00
5.2.10.0020.0308.92
5.2.00.0050.0288.78
5.1.60.0030.0248.07
5.1.50.0050.0238.06
5.1.40.0060.0228.05
5.1.30.0050.0248.40
5.1.20.0050.0268.42
5.1.10.0010.0298.14
5.1.00.0030.0268.14
5.0.50.0030.0216.62
5.0.40.0040.0186.48
5.0.30.0050.0316.29
5.0.20.0020.0206.27
5.0.10.0040.0196.24
5.0.00.0030.0306.23
4.4.90.0010.0174.78
4.4.80.0040.0134.75
4.4.70.0020.0164.75
4.4.60.0020.0164.75
4.4.50.0040.0154.77
4.4.40.0050.0234.71
4.4.30.0030.0154.76
4.4.20.0020.0164.85
4.4.10.0010.0174.85
4.4.00.0030.0244.76
4.3.110.0050.0134.67
4.3.100.0020.0204.67
4.3.90.0020.0224.63
4.3.80.0050.0244.58
4.3.70.0020.0154.63
4.3.60.0020.0154.63
4.3.50.0020.0164.63
4.3.40.0020.0254.54
4.3.30.0030.0153.29
4.3.20.0000.0193.26
4.3.10.0020.0163.22
4.3.00.0200.01015.68

preferences:
32.38 ms | 400 KiB | 5 Q