3v4l.org

run code in 300+ PHP versions simultaneously
<?php function main() { $res = array_fill(0, 100, array()); $m = memory_get_usage(true); for ($i = 0; $i < 10000; $i++) { $res = $res + array(); } echo "$i operations of \$res+=array() eats: " . (memory_get_usage(true) - $m) . "\n"; } main();

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.10.0100.01016.52
7.4.00.0080.01315.74
7.3.130.0060.01316.30
7.3.120.0110.00815.41
7.3.110.0040.01215.34
7.3.100.0060.01215.42
7.3.90.0090.00815.34
7.3.80.0070.01015.34
7.3.70.0070.01215.39
7.3.60.0080.00815.38
7.3.50.0020.01515.30
7.3.40.0100.00615.24
7.3.30.0010.01315.24
7.3.20.0070.00817.14
7.3.10.0060.01117.04
7.3.00.0070.00917.09
7.2.260.0090.01516.57
7.2.250.0080.01615.68
7.2.240.0060.01415.56
7.2.230.0060.01515.44
7.2.220.0020.01815.61
7.2.210.0080.01215.64
7.2.200.0000.02215.52
7.2.190.0070.01615.60
7.2.180.0050.01615.42
7.2.170.0070.01515.47
7.2.160.0050.01515.83
7.2.150.0070.01417.62
7.2.140.0050.01317.52
7.2.130.0070.01217.41
7.2.120.0070.01617.41
7.2.110.0080.01217.53
7.2.100.0080.01117.42
7.2.90.0060.01317.56
7.2.80.0030.01817.36
7.2.70.0070.01217.52
7.2.60.0040.01617.43
7.2.50.0060.01517.42
7.2.40.0050.01517.44
7.2.30.0040.01517.37
7.2.20.0060.01617.31
7.2.10.0050.01417.45
7.2.00.0100.00917.54
7.1.330.0050.01216.47
7.1.320.0080.01216.36
7.1.310.0080.01416.38
7.1.300.0060.01716.23
7.1.290.0030.01616.26
7.1.280.0050.01816.35
7.1.270.0080.01216.35
7.1.260.0120.00916.31
7.1.250.0070.01216.36
7.1.240.0060.00817.40
7.1.230.0030.01617.20
7.1.220.0100.01317.26
7.1.210.0040.01817.20
7.1.200.0070.01717.17
7.1.190.0070.00717.33
7.1.180.0130.01317.34
7.1.170.0110.01117.34
7.1.160.0070.01517.31
7.1.150.0040.01517.25
7.1.140.0100.01017.27
7.1.130.0000.02117.40
7.1.120.0100.01017.23
7.1.110.0060.01817.14
7.1.100.0030.01917.36
7.1.90.0000.01517.28
7.1.80.0040.01417.39
7.1.70.0050.01117.21
7.1.60.0110.01818.25
7.1.50.0070.02017.14
7.1.40.0030.01417.63
7.1.30.0060.02217.32
7.1.20.0070.01417.50
7.1.10.0070.01017.24
7.1.00.0020.05119.91
7.0.330.0030.01516.84
7.0.320.0060.01317.10
7.0.310.0080.01217.14
7.0.300.0070.01716.91
7.0.290.0040.01817.00
7.0.280.0040.01816.92
7.0.270.0060.01216.82
7.0.260.0060.00917.02
7.0.250.0120.00917.07
7.0.240.0070.01417.10
7.0.230.0000.01716.99
7.0.220.0090.01216.86
7.0.210.0070.01016.95
7.0.200.0030.01715.99
7.0.190.0000.02016.96
7.0.180.0030.01217.09
7.0.170.0030.01417.05
7.0.160.0100.01017.15
7.0.150.0030.01717.01
7.0.140.0000.04219.44
7.0.130.0060.01216.91
7.0.120.0030.01617.02
7.0.110.0030.01317.05
7.0.100.0200.03818.52
7.0.90.0160.03318.39
7.0.80.0050.03018.42
7.0.70.0130.02718.55
7.0.60.0070.05418.55
7.0.50.0070.04718.61
7.0.40.0070.04917.52
7.0.30.0050.05217.43
7.0.20.0020.02917.57
7.0.10.0030.05417.51
7.0.00.0070.04417.46
5.6.400.0030.04315.75
5.6.390.0070.04315.98
5.6.380.0100.03515.92
5.6.370.0040.03915.78
5.6.360.0060.04016.19
5.6.350.0070.04416.04
5.6.340.0030.04015.99
5.6.330.0070.04015.75
5.6.320.0000.04316.30
5.6.310.0000.05116.02
5.6.300.0070.03315.75
5.6.290.0070.03715.90
5.6.280.0070.07618.44
5.6.270.0100.03315.66
5.6.260.0030.04016.01
5.6.250.0050.05718.02
5.6.240.0050.07618.11
5.6.230.0070.07118.23
5.6.220.0070.07018.15
5.6.210.0120.07218.26
5.6.200.0070.07418.53
5.6.190.0080.07818.31
5.6.180.0050.07518.42
5.6.170.0070.05318.41
5.6.160.0030.06918.39
5.6.150.0000.05918.43
5.6.140.0070.05518.46
5.6.130.0100.05918.63
5.6.120.0060.07418.58
5.6.110.0080.04518.30
5.6.100.0050.05118.33
5.6.90.0030.07718.27
5.6.80.0070.04818.06
5.6.70.0070.07618.08
5.6.60.0050.06518.13
5.6.50.0030.05618.16
5.6.40.0050.06518.16
5.6.30.0080.08318.16
5.6.20.0050.07217.97
5.6.10.0120.06318.05
5.6.00.0070.06818.10
5.5.380.0000.05818.28
5.5.370.0120.05918.05
5.5.360.0080.07418.21
5.5.350.0060.05818.05
5.5.340.0030.07518.30
5.5.330.0070.07418.40
5.5.320.0070.07918.33
5.5.310.0030.06018.38
5.5.300.0080.07118.36
5.5.290.0120.07318.37
5.5.280.0120.07218.37
5.5.270.0030.05518.20
5.5.260.0070.07018.19
5.5.250.0070.07618.17
5.5.240.0080.07717.96
5.5.230.0080.07017.95
5.5.220.0150.06717.95
5.5.210.0020.06917.98
5.5.200.0100.07418.04
5.5.190.0050.06717.94
5.5.180.0130.06018.01
5.5.170.0060.03815.87
5.5.160.0130.06218.00
5.5.150.0120.06617.91
5.5.140.0020.07817.81
5.5.130.0050.07317.84
5.5.120.0030.08717.96
5.5.110.0030.05618.00
5.5.100.0130.06417.99
5.5.90.0130.07117.96
5.5.80.0000.07318.00
5.5.70.0050.07717.98
5.5.60.0070.06717.91
5.5.50.0070.07217.92
5.5.40.0120.06817.91
5.5.30.0050.06517.90
5.5.20.0050.05917.79
5.5.10.0130.06417.85
5.5.00.0070.04817.92
5.4.450.0070.07516.15
5.4.440.0080.04216.11
5.4.430.0070.07416.06
5.4.420.0030.06515.99
5.4.410.0030.07616.02
5.4.400.0050.07915.84
5.4.390.0050.07715.88
5.4.380.0070.05915.69
5.4.370.0070.07215.77
5.4.360.0020.08115.86
5.4.350.0050.07715.69
5.4.340.0050.07315.93
5.4.330.0000.04112.49
5.4.320.0080.06515.89
5.4.310.0030.07715.89
5.4.300.0070.08015.78
5.4.290.0050.07215.63
5.4.280.0070.06315.75
5.4.270.0070.06015.83
5.4.260.0080.07215.78
5.4.250.0080.06015.85
5.4.240.0130.05815.91
5.4.230.0050.05015.77
5.4.220.0030.05815.81
5.4.210.0050.07415.85
5.4.200.0050.05415.91
5.4.190.0080.07615.82
5.4.180.0050.06916.03
5.4.170.0000.05215.73
5.4.160.0080.04815.91
5.4.150.0070.04815.86
5.4.140.0070.05514.47
5.4.130.0070.05314.51
5.4.120.0030.05414.48
5.4.110.0030.05214.40
5.4.100.0030.04614.63
5.4.90.0050.04914.49
5.4.80.0070.07414.52
5.4.70.0020.06014.51
5.4.60.0050.08314.40
5.4.50.0020.06814.38
5.4.40.0020.05514.42
5.4.30.0020.06114.49
5.4.20.0030.05814.34
5.4.10.0080.04414.45
5.4.00.0030.05014.21
5.3.290.0070.10714.74
5.3.280.0100.10314.53
5.3.270.0100.09314.61
5.3.260.0070.06314.55
5.3.250.0030.06014.56
5.3.240.0000.06014.62
5.3.230.0000.06314.55
5.3.220.0130.05714.52
5.3.210.0070.05314.53
5.3.200.0130.06014.64
5.3.190.0070.05714.51
5.3.180.0000.05714.62
5.3.170.0030.05714.56
5.3.160.0030.12014.55
5.3.150.0070.05714.69
5.3.140.0070.06314.55
5.3.130.0030.06014.48
5.3.120.0000.08014.51
5.3.110.0100.05314.68
5.3.100.0030.06314.11
5.3.90.0000.06314.03
5.3.80.0070.06314.12
5.3.70.0070.06314.16
5.3.60.0030.05713.99
5.3.50.0030.06013.95
5.3.40.0100.04713.86
5.3.30.0000.05714.02
5.3.20.0070.05013.80
5.3.10.0030.05713.59
5.3.00.0000.05013.71
5.2.170.0070.05011.16
5.2.160.0030.05011.04
5.2.150.0030.05311.04
5.2.140.0070.04711.15
5.2.130.0000.04311.05
5.2.120.0030.04711.13
5.2.110.0030.06311.11
5.2.100.0000.05311.13
5.2.90.0070.04010.97
5.2.80.0030.05011.16
5.2.70.0000.04310.99
5.2.60.0000.05010.99
5.2.50.0000.05311.09
5.2.40.0030.05010.99
5.2.30.0000.05311.04
5.2.20.0000.04311.02
5.2.10.0000.05010.80
5.2.00.0000.02310.58
5.1.60.0030.02010.08
5.1.50.0070.01310.01
5.1.40.0000.02310.04
5.1.30.0000.02310.44
5.1.20.0030.02310.41
5.1.10.0030.02310.07
5.1.00.0030.0209.96
5.0.50.0030.0209.13
5.0.40.0070.0409.13
5.0.30.0000.0539.13
5.0.20.0030.0409.13
5.0.10.0000.0479.13
5.0.00.0030.0579.13
4.4.90.0000.0139.13
4.4.80.0000.0179.13
4.4.70.0000.0139.13
4.4.60.0000.0139.13
4.4.50.0000.0139.13
4.4.40.0000.0209.13
4.4.30.0030.0139.13
4.4.20.0000.0139.13
4.4.10.0070.0109.13
4.4.00.0100.0309.13
4.3.110.0000.0379.13
4.3.100.0000.0339.13
4.3.90.0000.0139.13
4.3.80.0030.0479.13
4.3.70.0070.0179.13
4.3.60.0000.0279.13
4.3.50.0070.0139.13
4.3.40.0000.0279.13
4.3.30.0030.0309.13
4.3.20.0070.0109.13
4.3.10.0000.0379.13
4.3.00.0000.0309.13

preferences:
32.91 ms | 400 KiB | 5 Q