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.10', $g1) . "\n"; $i = $s; while($i--) { $a = \true; } $g2 = $end-$start; echo 'Global \true: ' . sprintf('%f.10', $g2) . "\n"; } namespace foo { $start = microtime(true); $i = $s; while($i--) { $a = true; } $end = microtime(true); $n1 = $end-$start; echo 'Namespace true: ' . sprintf('%f.10', $n1) . "\n"; $i = $s; while($i--) { $a = \true; } $n2 = $end-$start; echo 'Namespace \true: ' . sprintf('%f.10', $n2) . "\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.0060.00619.40
7.1.70.0000.00716.95
7.1.60.0090.00919.61
7.1.50.0070.01417.00
7.1.00.0070.07322.48
7.0.200.0850.00315.08
7.0.140.0070.07022.07
7.0.60.0030.04719.92
7.0.50.0070.08017.82
7.0.40.0000.04719.90
7.0.30.0470.07320.04
7.0.20.0230.05720.18
7.0.10.0070.08720.00
7.0.00.0100.03720.00
5.6.280.0000.07720.82
5.6.210.0130.03020.73
5.6.200.0130.04018.09
5.6.190.0030.04720.61
5.6.180.0400.04320.29
5.6.170.0270.06320.51
5.6.160.0070.08320.40
5.6.150.0000.08718.18
5.6.140.0130.07018.07
5.6.130.0070.08318.07
5.6.120.0100.04020.92
5.6.110.0100.08020.86
5.6.100.0070.08720.98
5.6.90.0030.05021.10
5.6.80.0000.06320.43
5.5.350.0200.03320.43
5.5.340.0100.04017.98
5.5.330.0070.07320.56
5.5.320.0400.07720.27
5.5.310.0300.07320.27
5.5.300.0070.07317.91
5.5.290.0030.08018.00
5.5.280.0000.04320.78
5.5.270.0000.06720.64
5.5.260.0170.06320.79
5.5.250.0130.07020.69
5.5.240.0130.07320.37
5.4.450.0230.03719.24
5.4.440.0270.05019.45
5.4.430.0530.03319.48
5.4.420.0070.05019.44
5.4.410.0200.03719.43
5.4.400.0200.04018.93
5.4.390.0330.03719.09
5.4.380.0400.05718.48
5.4.370.0230.06718.75
5.4.360.0300.04318.48
5.4.350.0230.05718.71
5.4.340.0230.05018.48
5.4.320.0030.03912.46
5.4.310.0050.04112.46
5.4.300.0080.03912.46
5.4.290.0010.04412.46
5.4.280.0040.03712.36
5.4.270.0100.03312.36
5.4.260.0010.04212.36
5.4.250.0090.03612.36
5.4.240.0040.03812.36
5.4.230.0090.06112.35
5.4.220.0130.05512.35
5.4.210.0080.03712.35
5.4.200.0110.05212.35
5.4.190.0060.05312.34
5.4.180.0050.04112.34
5.4.170.0110.04112.36
5.4.160.0070.05212.35
5.4.150.0060.04212.35
5.4.140.0070.04912.04
5.4.130.0080.04512.02
5.4.120.0090.04311.98
5.4.110.0070.04011.97
5.4.100.0080.03611.98
5.4.90.0070.03811.97
5.4.80.0100.03711.97
5.4.70.0080.03711.97
5.4.60.0100.03311.97
5.4.50.0050.03711.97
5.4.40.0060.04411.96
5.4.30.0100.03311.96
5.4.20.0060.04111.96
5.4.10.0090.03711.96
5.4.00.0110.03311.45
5.3.290.0090.04212.80
5.3.280.0070.03912.71
5.3.270.0050.04212.73
5.3.260.0060.04112.72
5.3.250.0080.03812.71
5.3.240.0090.05012.72
5.3.230.0100.03812.71
5.3.220.0120.04412.68
5.3.210.0060.04112.68
5.3.200.0080.03512.68
5.3.190.0080.03612.68
5.3.180.0100.03312.67
5.3.170.0030.03912.67
5.3.160.0040.04012.67
5.3.150.0070.03912.67
5.3.140.0040.03912.66
5.3.130.0070.04412.66
5.3.120.0090.03612.66
5.3.110.0050.04412.66
5.3.100.0110.04612.12
5.3.90.0100.04812.09
5.3.80.0090.03712.08
5.3.70.0090.03512.08
5.3.60.0080.03612.07
5.3.50.0040.04912.01
5.3.40.0060.03712.01
5.3.30.0100.05011.97
5.3.20.0140.03711.75
5.3.10.0080.03511.72
5.3.00.0080.03611.71
5.2.170.0100.0289.18
5.2.160.0070.0279.18
5.2.150.0050.0319.18
5.2.140.0050.0329.18
5.2.130.0090.0269.14
5.2.120.0070.0299.14
5.2.110.0070.0329.15
5.2.100.0080.0289.14
5.2.90.0070.0289.14
5.2.80.0040.0329.14
5.2.70.0040.0339.14
5.2.60.0040.0329.09
5.2.50.0060.0319.06
5.2.40.0040.0299.04
5.2.30.0040.0329.02
5.2.20.0060.0319.00
5.2.10.0080.0268.92
5.2.00.0060.0298.79
5.1.60.0050.0248.06
5.1.50.0090.0218.06
5.1.40.0060.0238.05
5.1.30.0050.0268.40
5.1.20.0040.0278.41
5.1.10.0030.0288.14
5.1.00.0060.0248.14
5.0.50.0040.0216.62
5.0.40.0050.0186.48
5.0.30.0030.0326.29
5.0.20.0020.0206.26
5.0.10.0030.0206.25
5.0.00.0010.0336.23
4.4.90.0010.0174.78
4.4.80.0030.0154.75
4.4.70.0040.0164.76
4.4.60.0040.0154.76
4.4.50.0030.0154.77
4.4.40.0050.0274.71
4.4.30.0040.0164.76
4.4.20.0040.0154.84
4.4.10.0050.0144.85
4.4.00.0030.0254.75
4.3.110.0040.0144.67
4.3.100.0020.0164.66
4.3.90.0020.0154.64
4.3.80.0020.0264.59
4.3.70.0050.0134.63
4.3.60.0040.0134.63
4.3.50.0000.0184.62
4.3.40.0020.0254.54
4.3.30.0030.0153.28
4.3.20.0040.0143.26
4.3.10.0020.0153.22
4.3.00.0030.02013.95

preferences:
39.26 ms | 401 KiB | 5 Q