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('%.20f', $g1) . "\n"; $start = microtime(true); $i = $s; while($i--) { $a = \true; } $end = microtime(true); $g2 = $end-$start; //echo 'Global \true: ' . sprintf('%.20f', $g2) . "\n"; echo 'Global relative difference true to \true ' . sprintf('%.10f', (($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('%.20f', $n1) . "\n"; $start = microtime(true); $i = $s; while($i--) { $a = \true; } $end = microtime(true); $n2 = $end-$start; //echo 'Namespace \true: ' . sprintf('%.20f', $n2) . "\n"; echo 'Namespace relative difference true to \true ' . sprintf('%.10f', (($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.4.00.0100.55014.89
7.3.120.0100.58014.79
7.3.110.0030.44114.65
7.3.100.0030.48515.16
7.3.90.0000.57915.02
7.3.80.0030.51914.86
7.3.70.0030.41814.82
7.3.60.0100.41214.95
7.3.50.0000.41914.75
7.3.40.0030.38614.55
7.3.30.0000.55514.83
7.3.20.0070.45516.55
7.3.10.0030.50616.66
7.3.00.0030.51516.55
7.2.250.0130.58915.33
7.2.240.0130.60215.15
7.2.230.0030.59215.22
7.2.220.0070.54915.18
7.2.210.0070.53514.92
7.2.200.0000.41715.09
7.2.190.0100.44115.16
7.2.180.0100.49115.15
7.2.170.0000.54215.07
7.2.160.0100.55015.00
7.2.150.0030.56416.94
7.2.140.0030.44816.88
7.2.130.0140.52316.96
7.2.120.0070.45116.99
7.2.110.0070.54816.83
7.2.100.0070.55616.76
7.2.90.0070.56117.11
7.2.80.0030.56416.75
7.2.70.0070.49016.93
7.2.60.0070.45216.97
7.2.50.0030.54516.73
7.2.40.0000.42617.11
7.2.30.0030.44516.89
7.2.20.0100.47017.02
7.2.10.0030.45517.09
7.2.00.1080.45018.24
7.1.330.0071.00215.82
7.1.320.0001.06615.72
7.1.310.0071.25515.85
7.1.300.0031.07715.99
7.1.290.0001.51215.64
7.1.280.0071.09315.46
7.1.270.0031.28115.99
7.1.260.0101.39115.79
7.1.250.0131.33716.02
7.1.70.0030.38517.18
7.1.60.0100.42719.61
7.1.50.0000.50916.96
7.1.00.0100.51722.50
7.0.200.0830.49514.88
7.0.140.0070.44021.92
7.0.130.0130.60722.09
7.0.120.0070.50722.02
7.0.110.0030.61322.21
7.0.100.0000.47721.98
7.0.90.0030.47322.13
7.0.80.0000.47322.12
7.0.70.0100.79022.02
7.0.60.0030.46721.79
7.0.50.0100.47722.05
7.0.40.0070.50321.96
7.0.30.0000.51722.13
7.0.20.0000.38022.13
7.0.10.0100.66022.25
7.0.00.0070.63322.02
5.6.280.0070.91321.11
5.6.270.0030.76021.11
5.6.260.0000.74721.07
5.6.250.0070.75020.89
5.6.240.0000.80320.98
5.6.230.0100.76021.17
5.6.220.0000.75320.89
5.6.210.0000.91721.00
5.6.200.0100.86021.05
5.6.190.0071.05720.99
5.6.180.0030.92021.03
5.6.170.0000.79721.05
5.6.160.0030.88720.88
5.6.150.0070.99720.73
5.6.140.0100.75020.86
5.6.130.0000.76721.04
5.6.120.0000.75321.02
5.6.110.0071.00020.76
5.6.100.0100.91720.80
5.6.90.0100.79021.03
5.6.80.0070.79320.41
5.6.70.0070.82020.11
5.6.60.0070.74320.33
5.6.50.0030.78320.25
5.6.40.0030.74020.41
5.6.30.0000.75320.44
5.6.20.0000.76720.34
5.6.10.0070.73720.29
5.6.00.0000.87320.11
5.5.380.0000.77317.58
5.5.370.0030.74717.46
5.5.360.0000.76717.54
5.5.350.0070.75717.55
5.5.340.0030.78317.80
5.5.330.0130.75017.83
5.5.320.0070.75717.89
5.5.310.0070.75018.23
5.5.300.0000.84718.02
5.5.290.0000.88718.14
5.5.280.0070.77018.19
5.5.270.0000.81718.23
5.5.260.0100.76018.18
5.5.250.0001.02717.61
5.5.240.0070.91017.14
5.5.230.0030.77017.26
5.5.220.0030.75717.49
5.5.210.0070.80017.45
5.5.200.0070.77017.11
5.5.190.0100.74717.37
5.5.180.0000.77717.18
5.5.160.0000.76017.54
5.5.150.0070.86017.19
5.5.140.0030.76717.58
5.5.130.0030.89017.57
5.5.120.0000.77317.48
5.5.110.0070.75317.37
5.5.100.0070.86317.01
5.5.90.0030.76017.30
5.5.80.0100.75017.28
5.5.70.0000.77017.25
5.5.60.0030.77017.26
5.5.50.0000.75017.06
5.5.40.0001.13017.13
5.5.30.0000.76717.07
5.5.20.0000.79017.07
5.5.10.0000.76317.37
5.5.00.0031.00717.26
5.4.450.0000.80319.58
5.4.440.0001.14019.44
5.4.430.0030.75019.41
5.4.420.0070.86019.49
5.4.410.0000.76319.48
5.4.400.0030.75019.25
5.4.390.0030.76019.08
5.4.380.0070.76719.09
5.4.370.0130.73719.01
5.4.360.0030.84019.18
5.4.350.0030.75018.93
5.4.340.0070.74718.92
5.4.320.0000.75719.25
5.4.310.0000.90718.99
5.4.300.0000.76319.01
5.4.290.0030.86719.14
5.4.280.0030.75719.13
5.4.270.0030.75019.17
5.4.260.0070.74319.01
5.4.250.0001.01319.25
5.4.240.0000.82719.01
5.4.230.0031.00019.09
5.4.220.0030.91718.88
5.4.210.0000.77319.04
5.4.200.0030.98319.28
5.4.190.0001.01319.08
5.4.180.0030.75019.08
5.4.170.0000.75718.89
5.4.160.0030.75319.14
5.4.150.0070.75019.26
5.4.140.0001.03716.44
5.4.130.0030.86016.23
5.4.120.0070.75316.48
5.4.110.0030.92016.29
5.4.100.0071.00016.41
5.4.90.0030.90016.36
5.4.80.0070.80016.47
5.4.70.0070.78716.42
5.4.60.0070.77316.25
5.4.50.0070.74316.44
5.4.40.0070.75316.52
5.4.30.0030.73716.15
5.4.20.0030.67016.25
5.4.10.0030.74316.25
5.4.00.0030.75016.00

preferences:
38.28 ms | 401 KiB | 5 Q