3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace { $s = 10000000; $start = microtime(true); $i = $s; while($i--) { $a = true; } $end = microtime(true); $g1 = $end-$start; echo 'Global true: ' . sprintf('%f.20', $g1) . "\n"; $start = microtime(true); $i = $s; while($i--) { $a = \true; } $end = microtime(true); $g2 = $end-$start; echo 'Global \true: ' . sprintf('%f.20', $g2) . "\n"; echo 'Global relative difference true to \true ' . sprintf('%f.10', (($g2-$g1)*100)/$g1) . "%\n"; } namespace foo { $start = microtime(true); $i = $s; while($i--) { $a = true; } $end = microtime(true); $n1 = $end-$start; echo 'Namespace true: ' . sprintf('%f.20', $n1) . "\n"; $start = microtime(true); $i = $s; while($i--) { $a = \true; } $end = microtime(true); $n2 = $end-$start; echo 'Namespace \true: ' . sprintf('%f.20', $n2) . "\n"; echo 'Namespace relative difference true to \true ' . sprintf('%f.10', (($n2-$n1)*100)/$n1) . "%\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.0130.43416.72
7.2.130.0070.44816.79
7.2.120.0100.42816.80
7.2.110.0030.43716.62
7.2.100.0100.41816.59
7.2.90.0030.45016.93
7.2.80.0070.41916.72
7.2.70.0130.43116.58
7.2.60.0000.44216.77
7.2.50.0100.44816.95
7.2.40.0100.44317.07
7.2.30.0130.43716.98
7.2.20.0030.45016.75
7.2.10.0070.44616.43
7.2.00.0100.43618.12
7.1.250.0071.05616.00
7.1.240.0130.97615.71
7.1.230.0101.05415.84
7.1.220.0031.07615.87
7.1.210.0001.10115.85
7.1.200.0071.12415.91
7.1.190.0031.04815.43
7.1.180.0101.01015.82
7.1.170.0031.04515.61
7.1.160.0101.03615.63
7.1.150.0031.02115.45
7.1.140.0101.03415.41
7.1.130.0071.04415.66
7.1.120.0031.02715.77
7.1.110.0131.02515.84
7.1.100.0171.05315.29
7.1.90.0031.07215.78
7.1.80.0101.01415.44
7.1.70.0070.72716.38
7.1.60.0050.72017.60
7.1.50.0070.73216.25
7.1.40.0031.05615.71
7.1.30.0101.04515.61
7.1.20.0071.06215.35
7.1.10.0070.99415.68
7.1.00.0080.76219.10
7.0.330.0071.01115.30
7.0.320.0130.95115.51
7.0.310.0131.00215.02
7.0.300.0031.02115.43
7.0.290.0131.00515.27
7.0.280.0130.98315.34
7.0.270.0031.06815.02
7.0.260.0001.04815.30
7.0.250.0201.05315.31
7.0.240.0031.02815.30
7.0.230.0030.99915.13
7.0.220.0071.01515.38
7.0.210.0070.95715.16
7.0.200.0450.68715.13
7.0.190.0130.97015.15
7.0.180.0130.98915.30
7.0.170.0030.99515.42
7.0.160.0101.03915.36
7.0.150.0131.04115.36
7.0.140.0050.71318.83
7.0.130.0101.04415.50
7.0.120.0101.00915.48
7.0.110.0031.00915.45
7.0.100.0071.05915.23
7.0.90.0100.98814.98
7.0.80.0031.12315.59
7.0.70.0001.02515.19
7.0.60.0080.71517.40
7.0.50.0050.76116.65
7.0.40.0050.74216.76
7.0.30.0130.74716.80
7.0.20.0100.73416.86
7.0.10.0080.72416.85
7.0.00.0020.73916.88
5.6.380.0132.19814.49
5.6.370.0032.14714.28
5.6.360.0032.27914.46
5.6.350.0032.40814.21
5.6.340.0072.48414.23
5.6.330.0072.47414.52
5.6.320.0032.48614.23
5.6.310.0032.28414.02
5.6.300.0002.32214.00
5.6.290.0072.41514.20
5.6.280.0071.58817.45
5.6.270.0032.48714.07
5.6.260.0072.20314.29
5.6.250.0072.35714.22
5.6.240.0072.48314.27
5.6.230.0072.46314.04
5.6.220.0102.13913.91
5.6.210.0081.64217.38
5.6.200.1251.46716.05
5.6.190.0051.58217.23
5.6.180.0131.56117.42
5.6.170.0201.66817.38
5.6.160.0071.65817.22
5.6.150.0101.66516.13
5.6.140.0031.65616.27
5.6.130.0101.49616.22
5.6.120.0051.51717.81
5.6.110.0101.65217.79
5.6.100.0031.54317.59
5.6.90.0051.66917.65
5.6.80.0071.66717.38
5.6.70.2101.40917.42
5.6.60.0072.47714.20
5.6.50.0072.24514.42
5.6.40.0102.25214.38
5.6.30.0072.36514.20
5.6.20.0002.37414.06
5.6.10.0102.35014.25
5.6.00.0102.32314.32
5.5.380.0032.42711.18
5.5.370.0102.45211.18
5.5.360.0032.48011.19
5.5.350.0031.67315.81
5.5.340.0101.65914.55
5.5.330.0071.62815.77
5.5.320.0131.66315.76
5.5.310.0171.66215.74
5.5.300.0031.64914.60
5.5.290.0051.59114.58
5.5.280.0021.63416.00
5.5.270.0071.62215.99
5.5.260.0001.59116.03
5.5.250.0051.53715.94
5.5.240.0071.67015.61
5.5.230.0072.23711.18
5.5.220.0032.22811.18
5.5.210.0072.21011.18
5.5.200.0002.41011.18
5.5.190.0032.47011.18
5.5.180.0072.43611.18
5.5.170.0072.49111.18
5.5.160.0102.45711.18
5.5.150.0002.46411.18
5.5.140.0072.31611.18
5.5.130.0032.41811.18
5.5.120.0032.43411.18
5.5.110.0072.49011.18
5.5.100.0102.48711.18
5.5.90.0032.46411.18
5.5.80.0032.46611.18
5.5.70.0032.40411.18
5.5.60.0032.20811.18
5.5.50.0032.40811.18
5.5.40.0102.18811.18
5.5.30.0032.46811.18
5.5.20.0002.23711.18
5.5.10.0032.22711.18
5.5.00.0072.48211.18
5.4.450.0271.56315.31
5.4.440.2071.64515.29
5.4.430.0071.56615.29
5.4.420.0131.52415.38
5.4.410.0181.52815.23
5.4.400.0211.55615.11
5.4.390.2221.51515.20
5.4.380.0151.63515.15
5.4.370.0101.51915.17
5.4.360.0131.55615.05
5.4.350.0181.50015.17
5.4.340.0121.54315.21
5.4.330.0072.29811.18
5.4.320.0051.52911.82
5.4.310.0081.63011.82
5.4.300.0051.61611.82
5.4.290.0091.61711.82
5.4.280.0051.66811.77
5.4.270.0051.67011.77
5.4.260.0071.67311.77
5.4.250.0101.68011.77
5.4.240.0081.59611.77
5.4.230.0071.60211.77
5.4.220.0151.60811.76
5.4.210.0081.64711.76
5.4.200.0111.74611.77
5.4.190.0041.61011.76
5.4.180.0051.60711.76
5.4.170.0071.58711.77
5.4.160.0081.61911.77
5.4.150.0051.61711.77
5.4.140.0091.62611.61
5.4.130.0101.61511.60
5.4.120.0071.64911.58
5.4.110.0051.61511.58
5.4.100.0101.66811.58
5.4.90.0121.68711.58
5.4.80.0091.66811.58
5.4.70.0071.62711.57
5.4.60.0061.67811.58
5.4.50.0091.64211.58
5.4.40.0101.61811.57
5.4.30.0051.64211.57
5.4.20.0091.62811.57
5.4.10.0061.65911.57
5.4.00.0101.66211.31

preferences:
33.58 ms | 401 KiB | 5 Q