3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = ''; $len = 100; $start = microtime(true); for ($i = 0; $i < $len; $i++) { $html .= 'a'; } var_dump(microtime(true) - $start); $html = ''; $start = microtime(true); $tmp = array(); for ($i = 0; $i < $len; $i++) { $tmp[] = 'a'; } $html = join('', $tmp); var_dump(microtime(true) - $start);

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.0110.00715.00
7.4.00.0000.01715.01
7.3.130.0040.01414.60
7.3.120.0140.00014.86
7.3.110.0100.01014.52
7.3.100.0070.00715.09
7.3.90.0100.00714.88
7.3.80.0000.00915.01
7.3.70.0070.00714.89
7.3.60.0030.01014.56
7.3.50.0110.00414.79
7.3.40.0070.00314.92
7.3.30.0030.01214.66
7.3.20.0040.00816.81
7.3.10.0030.01016.67
7.3.00.0040.00816.62
7.2.260.0100.00715.19
7.2.250.0080.00815.01
7.2.240.0040.01515.06
7.2.230.0070.00715.02
7.2.220.0040.01115.21
7.2.210.0080.00414.79
7.2.200.0030.01014.94
7.2.190.0030.01015.28
7.2.180.0040.00714.95
7.2.170.0040.00914.90
7.2.160.0030.01014.97
7.2.150.0030.01316.61
7.2.140.0100.00316.84
7.2.130.0040.00816.92
7.2.120.0120.00716.86
7.2.110.0050.00816.80
7.2.100.0040.01216.88
7.2.90.0060.00716.77
7.2.80.0060.01016.80
7.2.70.0050.00916.84
7.2.60.0080.00816.95
7.2.50.0090.00916.97
7.2.40.0110.00616.88
7.2.30.0100.00816.96
7.2.20.0080.00716.87
7.2.10.0050.00816.84
7.2.00.0050.00817.37
7.1.330.0030.01415.93
7.1.320.0090.00615.90
7.1.310.0060.00615.56
7.1.300.0100.00015.89
7.1.290.0100.00315.83
7.1.280.0070.00716.04
7.1.270.0060.01315.69
7.1.260.0030.00615.84
7.1.250.0070.00815.65
7.1.240.0040.01115.76
7.1.230.0050.00915.60
7.1.220.0060.00415.70
7.1.210.0100.00515.66
7.1.200.0080.00315.86
7.1.190.0060.00615.93
7.1.180.0070.00715.85
7.1.170.0030.00915.84
7.1.160.0020.01015.58
7.1.150.0040.01115.88
7.1.140.0080.00315.79
7.1.130.0050.00715.96
7.1.120.0070.00615.71
7.1.110.0050.00815.84
7.1.100.0020.01515.87
7.1.90.0030.00815.75
7.1.80.0030.01215.91
7.1.70.0060.00616.25
7.1.60.0060.01016.93
7.1.50.0040.01116.19
7.1.40.0060.00715.71
7.1.30.0040.01115.70
7.1.20.0050.01015.71
7.1.10.0060.00615.81
7.1.00.0020.02018.00
7.0.330.0060.00615.37
7.0.320.0050.00815.29
7.0.310.0030.00815.34
7.0.300.0060.00815.38
7.0.290.0050.00815.48
7.0.280.0050.00615.42
7.0.270.0060.00815.49
7.0.260.0060.00615.29
7.0.250.0050.01015.28
7.0.240.0030.00915.31
7.0.230.0050.00815.38
7.0.220.0080.00515.41
7.0.210.0050.01015.39
7.0.200.0030.01015.90
7.0.190.0050.00715.42
7.0.180.0070.00715.56
7.0.170.0070.00715.47
7.0.160.0060.00915.42
7.0.150.0110.00215.42
7.0.140.0060.02817.59
7.0.130.0040.00915.52
7.0.120.0050.00715.65
7.0.110.0040.00915.53
7.0.100.0050.00915.35
7.0.90.0050.01015.34
7.0.80.0070.00515.51
7.0.70.0050.02917.56
7.0.60.0060.03017.53
7.0.50.0040.02717.73
7.0.40.0050.03415.69
7.0.30.0030.03215.63
7.0.20.0050.03115.64
7.0.10.0060.03115.62
7.0.00.0060.03315.73
5.6.400.0030.01014.34
5.6.390.0000.01014.40
5.6.380.0070.00914.59
5.6.370.0080.00414.50
5.6.360.0090.00714.17
5.6.350.0070.00314.34
5.6.340.0020.01214.12
5.6.330.0070.00714.48
5.6.320.0030.01214.18
5.6.310.0050.01014.60
5.6.300.0070.00714.41
5.6.290.0030.01014.55
5.6.280.0090.02416.72
5.6.270.0050.00914.41
5.6.260.0040.00814.64
5.6.250.0060.00914.37
5.6.240.0050.01114.38
5.6.230.0090.00714.18
5.6.220.0060.01716.39
5.6.210.0020.03316.49
5.6.200.0080.02916.61
5.6.190.0060.03316.62
5.6.180.0040.03116.54
5.6.170.0050.03516.58
5.6.160.0040.02516.55
5.6.150.0080.03116.49
5.6.140.0060.02916.54
5.6.130.0060.03216.49
5.6.120.0060.03316.75
5.6.110.0040.03116.47
5.6.100.0060.03216.61
5.6.90.0060.02616.48
5.6.80.0080.01516.39
5.6.70.0070.01816.35
5.6.60.0020.02116.20
5.6.50.0010.03116.53
5.6.40.0050.03316.36
5.6.30.0020.03316.35
5.6.20.0030.02216.39
5.6.10.0080.02916.27
5.6.00.0050.03016.29
5.5.380.0060.01012.61
5.5.370.0050.00612.75
5.5.360.0030.03015.29
5.5.350.0080.02715.22
5.5.340.0060.03115.49
5.5.330.0080.02815.46
5.5.320.0070.02615.48
5.5.310.0030.03215.31
5.5.300.0070.02815.44
5.5.290.0060.03315.39
5.5.280.0040.03215.52
5.5.270.0010.03815.58
5.5.260.0040.03015.52
5.5.250.0030.02715.31
5.5.240.0050.01615.16
5.5.230.0050.02715.09
5.5.220.0060.02315.22
5.5.210.0050.02415.20
5.5.200.0040.02715.18
5.5.190.0090.02815.26
5.5.180.0020.03015.19
5.5.170.0020.01012.75
5.5.160.0070.02815.18
5.5.150.0060.01715.23
5.5.140.0070.01715.21
5.5.130.0020.01815.31
5.5.120.0010.01815.16
5.5.110.0050.01615.22
5.5.100.0060.01615.17
5.5.90.0080.01115.24
5.5.80.0000.01915.16
5.5.70.0020.02115.05
5.5.60.0040.02115.06
5.5.50.0040.02015.12
5.5.40.0040.02015.13
5.5.30.0040.01715.15
5.5.20.0060.01715.16
5.5.10.0060.01415.21
5.5.00.0040.01515.11
5.4.450.0020.02913.97
5.4.440.0050.02813.74
5.4.430.0020.03313.85
5.4.420.0060.03213.84
5.4.410.0080.02813.90
5.4.400.0040.02913.72
5.4.390.0050.02913.80
5.4.380.0020.03013.70
5.4.370.0060.02913.69
5.4.360.0020.02713.71
5.4.350.0000.03013.70
5.4.340.0030.03013.60
5.4.330.0050.00711.17
5.4.320.0050.02313.78
5.4.310.0010.01913.68
5.4.300.0020.01913.77
5.4.290.0040.01313.71
5.4.280.0050.01713.71
5.4.270.0030.01713.78
5.4.260.0050.01313.72
5.4.250.0020.01413.61
5.4.240.0050.01213.74
5.4.230.0020.01513.60
5.4.220.0020.01713.80
5.4.210.0030.01413.54
5.4.200.0060.01113.55
5.4.190.0050.01713.72
5.4.180.0020.01813.80
5.4.170.0030.01513.79
5.4.160.0060.01113.66
5.4.150.0050.01713.77
5.4.140.0030.01712.87
5.4.130.0030.01512.85
5.4.120.0070.01012.69
5.4.110.0060.01212.76
5.4.100.0030.01212.83
5.4.90.0030.01512.84
5.4.80.0040.01612.79
5.4.70.0030.01512.90
5.4.60.0040.01512.81
5.4.50.0030.01412.85
5.4.40.0060.01412.83
5.4.30.0020.01512.88
5.4.20.0060.01412.75
5.4.10.0040.01612.82
5.4.00.0030.01812.63
5.3.290.0030.02412.18
5.3.280.0010.01712.20
5.3.270.0050.01512.18
5.3.260.0010.02112.19
5.3.250.0040.01412.21
5.3.240.0020.01612.08
5.3.230.0040.01712.13
5.3.220.0030.01412.15
5.3.210.0030.01412.14
5.3.200.0030.01212.18
5.3.190.0020.01712.15
5.3.180.0020.01412.22
5.3.170.0020.01412.26
5.3.160.0040.01312.18
5.3.150.0030.01712.16
5.3.140.0030.01612.18
5.3.130.0000.01512.12
5.3.120.0040.01412.19
5.3.110.0030.01212.19
5.3.100.0050.01912.12
5.3.90.0030.02812.19
5.3.80.0000.03112.05
5.3.70.0000.03012.13
5.3.60.0030.02212.12
5.3.50.0050.02712.16
5.3.40.0040.02912.16
5.3.30.0060.02712.20
5.3.20.0030.02812.14
5.3.10.0040.02612.04
5.3.00.0060.02612.06
5.2.170.0060.03013.01
5.2.160.0030.03313.01
5.2.150.0050.03313.01
5.2.140.0020.03813.01
5.2.130.0010.03313.01
5.2.120.0000.03613.01
5.2.110.0050.03313.01
5.2.100.0030.03113.01
5.2.90.0050.02813.01
5.2.80.0000.03513.01
5.2.70.0030.03213.01
5.2.60.0060.03113.01
5.2.50.0020.03513.01
5.2.40.0030.03313.01
5.2.30.0030.03313.01
5.2.20.0060.02613.01
5.2.10.0090.02813.01
5.2.00.0030.03313.01
5.1.60.0050.02513.01
5.1.50.0020.03113.01
5.1.40.0030.02813.01
5.1.30.0040.02713.01
5.1.20.0100.02013.01
5.1.10.0080.02113.01
5.1.00.0060.01713.01
5.0.50.0040.02213.01
5.0.40.0040.02313.01
5.0.30.0000.03513.01
5.0.20.0020.02613.01
5.0.10.0040.02313.01
5.0.00.0030.03313.01
4.4.90.0020.02113.01
4.4.80.0000.01713.01
4.4.70.0020.02213.01
4.4.60.0020.01813.01
4.4.50.0020.01813.01
4.4.40.0020.03013.01
4.4.30.0060.01613.01
4.4.20.0030.01013.01
4.4.10.0040.01813.01
4.4.00.0030.02613.01
4.3.110.0030.01813.01
4.3.100.0010.01813.01
4.3.90.0010.02013.01
4.3.80.0000.03013.01
4.3.70.0040.01813.01
4.3.60.0030.01813.01
4.3.50.0000.01913.01
4.3.40.0040.02613.01
4.3.30.0030.02013.01
4.3.20.0010.02013.01
4.3.10.0020.02113.01
4.3.00.0030.01513.01

preferences:
29.45 ms | 403 KiB | 5 Q