3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace { $s = 1000; $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"; } 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)/$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.2.00.0040.00719.16
7.1.70.0000.00717.22
7.1.60.0030.02119.61
7.1.50.0140.00716.96
7.1.00.0100.07322.45
7.0.200.0710.00915.00
7.0.140.0070.06322.01
7.0.60.0130.03719.82
7.0.50.0000.08317.89
7.0.40.0030.04720.38
7.0.30.0330.07320.00
7.0.20.0170.05020.18
7.0.10.0230.05720.33
7.0.00.0100.08020.18
5.6.280.0070.07320.93
5.6.210.0100.07720.47
5.6.200.0030.08018.17
5.6.190.0030.07020.27
5.6.180.0170.04020.35
5.6.170.0100.05020.33
5.6.160.0100.03320.37
5.6.150.0130.07718.16
5.6.140.0030.08318.17
5.6.130.0070.05318.17
5.6.120.0000.07721.03
5.6.110.0030.08320.98
5.6.100.0030.04020.96
5.6.90.0130.08021.11
5.6.80.0030.04720.38
5.6.70.0370.06320.38
5.5.350.0230.06320.45
5.5.340.0000.08017.98
5.5.330.0030.08320.19
5.5.320.0200.04720.29
5.5.310.0130.04020.21
5.5.300.0070.08018.02
5.5.290.0070.07717.88
5.5.280.0100.08020.75
5.5.270.0070.07320.98
5.5.260.0030.04020.80
5.5.250.0030.08020.79
5.5.240.0170.07320.25
5.4.450.0300.04319.25
5.4.440.0470.05019.26
5.4.430.0400.04319.57
5.4.420.0430.03719.45
5.4.410.0130.04719.33
5.4.400.0200.04019.07
5.4.390.0270.05018.92
5.4.380.0230.06318.72
5.4.370.0270.05318.61
5.4.360.0330.05718.60
5.4.350.0170.05718.72
5.4.340.0200.05718.51
5.4.320.0070.03712.46
5.4.310.0070.03912.46
5.4.300.0080.04112.47
5.4.290.0090.05312.46
5.4.280.0080.03612.36
5.4.270.0070.04112.36
5.4.260.0050.03912.36
5.4.250.0080.04712.36
5.4.240.0070.03612.36
5.4.230.0080.03612.35
5.4.220.0060.03712.35
5.4.210.0050.03612.36
5.4.200.0080.03612.36
5.4.190.0040.04012.35
5.4.180.0070.03612.35
5.4.170.0060.03712.36
5.4.160.0040.03912.36
5.4.150.0060.03912.36
5.4.140.0060.03812.04
5.4.130.0080.03612.03
5.4.120.0060.03611.99
5.4.110.0050.03811.98
5.4.100.0070.03911.98
5.4.90.0050.04011.98
5.4.80.0070.03811.98
5.4.70.0070.05111.97
5.4.60.0060.04111.97
5.4.50.0070.04011.98
5.4.40.0090.03411.96
5.4.30.0030.04111.96
5.4.20.0070.04311.96
5.4.10.0090.04011.96
5.4.00.0050.04011.45
5.3.290.0080.04312.80
5.3.280.0120.03912.71
5.3.270.0080.04112.72
5.3.260.0070.03912.72
5.3.250.0090.03712.72
5.3.240.0060.04012.72
5.3.230.0080.03712.71
5.3.220.0080.03512.68
5.3.210.0050.04012.68
5.3.200.0070.03712.68
5.3.190.0040.04112.68
5.3.180.0060.03712.67
5.3.170.0040.03812.67
5.3.160.0070.03512.68
5.3.150.0050.04112.67
5.3.140.0060.05112.66
5.3.130.0080.04012.65
5.3.120.0080.03712.66
5.3.110.0040.04312.66
5.3.100.0060.03712.12
5.3.90.0050.03712.09
5.3.80.0090.03412.09
5.3.70.0070.04012.08
5.3.60.0100.03412.07
5.3.50.0060.03712.02
5.3.40.0050.03912.02
5.3.30.0080.03711.97
5.3.20.0050.03811.75
5.3.10.0100.03111.72
5.3.00.0080.03511.71
5.2.170.0050.0309.18
5.2.160.0040.0349.18
5.2.150.0040.0319.18
5.2.140.0080.0279.18
5.2.130.0030.0309.14
5.2.120.0070.0259.14
5.2.110.0030.0319.15
5.2.100.0030.0309.14
5.2.90.0050.0289.15
5.2.80.0060.0309.14
5.2.70.0040.0319.14
5.2.60.0070.0319.09
5.2.50.0050.0309.06
5.2.40.0050.0309.04
5.2.30.0050.0309.01
5.2.20.0030.0329.00
5.2.10.0050.0278.92
5.2.00.0090.0258.79
5.1.60.0040.0268.07
5.1.50.0070.0258.07
5.1.40.0010.0348.05
5.1.30.0040.0258.40
5.1.20.0040.0278.42
5.1.10.0060.0238.14
5.1.00.0040.0258.14
5.0.50.0010.0236.62
5.0.40.0030.0196.48
5.0.30.0020.0326.29
5.0.20.0010.0226.27
5.0.10.0030.0216.24
5.0.00.0050.0306.23
4.4.90.0050.0134.78
4.4.80.0030.0154.76
4.4.70.0030.0154.75
4.4.60.0040.0144.76
4.4.50.0030.0174.77
4.4.40.0020.0264.70
4.4.30.0030.0164.75
4.4.20.0030.0164.85
4.4.10.0030.0154.85
4.4.00.0030.0244.76
4.3.110.0040.0154.67
4.3.100.0010.0174.66
4.3.90.0050.0124.63
4.3.80.0030.0264.59
4.3.70.0020.0164.63
4.3.60.0040.0134.62
4.3.50.0030.0154.63
4.3.40.0030.0234.54
4.3.30.0040.0143.29
4.3.20.0010.0163.26
4.3.10.0010.0163.22
4.3.00.0030.01713.95

preferences:
34.64 ms | 401 KiB | 5 Q