3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(); $a[1] = 'toto'; echo memory_get_usage() . '\n'; $a[2] = 'titi'; echo memory_get_usage() . '\n'; $a[1000000] = 'tata'; echo memory_get_usage() . '\n';

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.00.0140.00016.72
7.2.130.0060.00316.78
7.2.120.0060.00916.56
7.2.110.0060.00916.73
7.2.100.0030.00916.93
7.2.90.0070.00716.81
7.2.80.0030.00616.74
7.2.70.0070.00716.68
7.2.60.0070.00716.76
7.2.50.0040.01116.93
7.2.40.0000.01616.87
7.2.30.0040.00916.79
7.2.20.0080.00416.61
7.2.10.0060.00616.83
7.2.00.0030.01018.11
7.1.250.0000.01115.95
7.1.240.0060.00315.92
7.1.230.0060.00315.62
7.1.220.0040.00415.86
7.1.210.0040.00715.69
7.1.200.0080.00315.68
7.1.190.0000.00815.67
7.1.180.0070.00315.71
7.1.170.0080.00315.92
7.1.160.0000.01115.88
7.1.150.0030.00715.70
7.1.140.0000.00715.67
7.1.130.0030.00715.77
7.1.120.0030.00615.75
7.1.110.0030.00515.90
7.1.100.0030.00715.88
7.1.90.0040.00715.73
7.1.80.0030.00715.86
7.1.70.0020.00716.51
7.1.60.0060.00516.41
7.1.50.0090.00516.33
7.1.40.0030.00715.86
7.1.30.0030.00715.50
7.1.20.0100.00315.77
7.1.10.0030.01015.68
7.1.00.0050.02819.08
7.0.330.0060.00315.15
7.0.320.0070.00715.19
7.0.310.0030.01015.34
7.0.300.0030.00715.22
7.0.290.0030.00715.30
7.0.280.0080.00415.29
7.0.270.0000.01015.45
7.0.260.0090.00015.04
7.0.250.0040.00815.12
7.0.240.0000.01315.38
7.0.230.0060.00615.28
7.0.220.0030.00715.49
7.0.210.0060.00915.48
7.0.200.0060.00615.93
7.0.190.0040.00415.38
7.0.180.0030.01215.42
7.0.170.0090.00615.17
7.0.160.0060.00314.94
7.0.150.0000.01215.26
7.0.140.0050.03818.64
7.0.130.0050.00515.34
7.0.120.0050.00515.51
7.0.110.0060.00615.27
7.0.100.0000.00815.34
7.0.90.0040.00415.28
7.0.80.0040.01115.33
7.0.70.0080.00415.60
7.0.60.0050.04717.55
7.0.50.0060.02316.61
7.0.40.0030.02815.60
7.0.30.0050.02715.54
7.0.20.0070.02515.57
7.0.10.0030.02415.58
7.0.00.0020.02715.67
5.6.380.0030.01314.59
5.6.370.0000.01314.31
5.6.360.0140.00014.37
5.6.350.0080.00314.49
5.6.340.0000.01114.60
5.6.330.0060.00914.67
5.6.320.0040.00714.71
5.6.310.0070.00414.79
5.6.300.0030.00914.37
5.6.290.0060.00314.25
5.6.280.0000.04517.66
5.6.270.0030.01014.20
5.6.260.0060.00614.71
5.6.250.0000.01314.29
5.6.240.0000.01314.43
5.6.230.0070.00714.24
5.6.220.0060.00914.51
5.6.210.0130.03817.63
5.6.200.0030.03016.32
5.6.190.0070.02516.35
5.6.180.0060.02316.09
5.6.170.0030.02516.47
5.6.160.0060.02116.12
5.6.150.0060.02116.31
5.6.140.0040.02316.12
5.6.130.0080.02016.35
5.6.120.0070.02716.25
5.6.110.0080.02316.42
5.6.100.0030.02716.33
5.6.90.0050.02716.36
5.6.80.0050.02816.02
5.6.70.0090.03315.90
5.6.60.0070.02715.99
5.6.50.0110.02815.87
5.6.40.0080.02815.74
5.6.30.0080.04015.91
5.6.20.0100.02415.90
5.6.10.0070.04715.97
5.6.00.0050.03915.81
5.5.380.0000.00610.89
5.5.370.0030.00710.95
5.5.360.0000.00511.13
5.5.350.0070.02315.82
5.5.340.0030.02314.40
5.5.330.0020.02414.69
5.5.320.0060.02814.53
5.5.310.0010.02114.50
5.5.300.0050.02314.58
5.5.290.0050.02314.46
5.5.280.0020.03214.34
5.5.270.0030.02314.31
5.5.260.0030.02514.38
5.5.250.0000.02614.46
5.5.240.0030.03714.19
5.5.230.0060.02014.16
5.5.220.0030.02714.21
5.5.210.0060.04214.26
5.5.200.0030.03914.19
5.5.190.0050.04213.95
5.5.180.0050.04314.31
5.5.170.0040.00410.97
5.5.160.0070.04014.24
5.5.150.0050.04214.24
5.5.140.0030.04014.13
5.5.130.0100.03814.04
5.5.120.0050.04014.11
5.5.110.0090.03014.28
5.5.100.0060.03713.95
5.5.90.0110.03414.15
5.5.80.0120.03714.07
5.5.70.0070.04214.21
5.5.60.0030.02714.25
5.5.50.0050.04213.95
5.5.40.0070.02414.01
5.5.30.0060.04014.10
5.5.20.0040.02514.02
5.5.10.0070.04114.05
5.5.00.0080.02814.08
5.4.450.0020.02515.25
5.4.440.0030.02415.16
5.4.430.0030.02015.27
5.4.420.0050.02015.19
5.4.410.0030.02015.08
5.4.400.0060.04114.97
5.4.390.0060.02114.97
5.4.380.0090.02215.25
5.4.370.0050.04415.07
5.4.360.0050.04014.98
5.4.350.0050.03514.82
5.4.340.0080.03314.99
5.4.330.0040.00710.64
5.4.320.0110.03614.94
5.4.310.0030.04115.01
5.4.300.0020.04614.98
5.4.290.0030.03714.88
5.4.280.0050.03915.06
5.4.270.0030.03714.96
5.4.260.0120.03214.91
5.4.250.0090.03814.95
5.4.240.0050.04015.13
5.4.230.0060.03515.00
5.4.220.0020.04115.02
5.4.210.0110.03215.00
5.4.200.0030.02914.84
5.4.190.0050.03014.94
5.4.180.0110.03814.96
5.4.170.0050.04014.95
5.4.160.0070.02015.06
5.4.150.0080.03814.79
5.4.140.0030.04313.82
5.4.130.0030.03113.62
5.4.120.0070.03813.45
5.4.110.0050.02613.65
5.4.100.0050.02813.75
5.4.90.0050.02013.46
5.4.80.0050.03013.50
5.4.70.0010.03513.63
5.4.60.0030.02813.56
5.4.50.0050.02113.63
5.4.40.0070.03213.72
5.4.30.0030.03813.66
5.4.20.0050.03013.64
5.4.10.0070.03713.65
5.4.00.0070.03613.37
5.3.290.0020.04312.64
5.3.280.0050.04212.47
5.3.270.0050.03312.57
5.3.260.0030.02512.44
5.3.250.0070.04012.45
5.3.240.0050.04012.49
5.3.230.0100.03312.33
5.3.220.0070.02012.46
5.3.210.0050.03512.43
5.3.200.0070.02512.33
5.3.190.0100.03612.38
5.3.180.0050.03512.62
5.3.170.0050.02212.63
5.3.160.0070.02912.53
5.3.150.0040.02012.47
5.3.140.0070.03812.46
5.3.130.0100.03112.59
5.3.120.0020.03212.49
5.3.110.0050.03312.64
5.3.100.0060.02712.27
5.3.90.0100.03512.23
5.3.80.0000.03212.10
5.3.70.0070.03012.10
5.3.60.0060.03312.07
5.3.50.0030.03712.13
5.3.40.0020.03912.01
5.3.30.0090.02512.02
5.3.20.0020.02611.87
5.3.10.0030.02511.79
5.3.00.0070.03111.94
5.2.170.0030.03310.63
5.2.160.0060.02710.47
5.2.150.0050.03310.47
5.2.140.0050.02310.54
5.2.130.0000.02310.52
5.2.120.0050.03110.45
5.2.110.0030.02310.50
5.2.100.0050.03010.45
5.2.90.0070.02710.48
5.2.80.0050.03310.52
5.2.70.0030.03210.52
5.2.60.0040.02710.58
5.2.50.0050.02110.56
5.2.40.0040.01810.45
5.2.30.0050.02310.45
5.2.20.0030.02210.46
5.2.10.0070.03310.39
5.2.00.0020.02510.30
5.1.60.0050.0209.95
5.1.50.0030.0269.97
5.1.40.0000.0179.89
5.1.30.0020.01710.17
5.1.20.0040.03010.18
5.1.10.0040.0209.93
5.1.00.0050.02010.03
5.0.50.0020.0299.36
5.0.40.0000.0159.36
5.0.30.0070.0329.36
5.0.20.0020.0259.36
5.0.10.0000.0179.36
5.0.00.0000.0319.36
4.4.90.0030.0159.36
4.4.80.0020.0199.36
4.4.70.0030.0189.36
4.4.60.0020.0179.36
4.4.50.0050.0169.36
4.4.40.0020.0299.36
4.4.30.0000.0159.36
4.4.20.0030.0199.36
4.4.10.0050.0149.36
4.4.00.0010.0239.36
4.3.110.0020.0189.36
4.3.100.0010.0159.36
4.3.90.0020.0129.36
4.3.80.0030.0299.36
4.3.70.0030.0179.36
4.3.60.0010.0169.36
4.3.50.0020.0209.36
4.3.40.0020.0279.36
4.3.30.0000.0199.36
4.3.20.0050.0159.36
4.3.10.0000.0199.36
4.3.00.0000.0179.36

preferences:
39.13 ms | 401 KiB | 5 Q