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"; $start = microtime(true); $i = $s; while($i--) { $a = \true; } $end = microtime(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"; $start = microtime(true); $i = $s; while($i--) { $a = \true; } $end = microtime(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.3.10.0050.00616.49
7.3.00.0070.00516.46
7.2.130.0070.00916.99
7.2.120.0090.00316.90
7.2.110.0030.01216.52
7.2.100.0080.00916.73
7.2.90.0100.00316.79
7.2.80.0130.00316.69
7.2.70.0090.00416.99
7.2.60.0100.00816.80
7.2.50.0060.00816.75
7.2.40.0130.00316.89
7.2.30.0080.00616.95
7.2.20.0110.00416.91
7.2.10.0070.00616.80
7.2.00.0080.00517.74
7.1.250.0120.00615.72
7.1.70.0060.00317.14
7.1.60.0170.00719.61
7.1.50.0070.01316.97
7.1.00.0070.07322.30
7.0.200.0760.01014.93
7.0.140.0070.07022.00
7.0.60.0100.06319.94
7.0.50.0030.04017.88
7.0.40.0070.05020.27
7.0.30.0170.04020.21
7.0.20.0370.07720.09
7.0.10.0000.10020.30
7.0.00.0000.04720.20
5.6.280.0070.07020.90
5.6.210.0070.08720.45
5.6.200.0100.03718.16
5.6.190.0000.07020.75
5.6.180.0300.04720.33
5.6.170.0230.07020.54
5.6.160.0030.08020.51
5.6.150.0100.06018.12
5.6.140.0000.04018.21
5.6.130.0030.04318.12
5.6.120.0000.07721.04
5.6.110.0070.08721.12
5.6.100.0070.08321.15
5.6.90.0100.06321.01
5.6.80.0030.08320.38
5.5.350.0300.07320.31
5.5.340.0000.04317.98
5.5.330.0070.08020.45
5.5.320.0300.05020.18
5.5.310.0270.07320.29
5.5.300.0100.08017.95
5.5.290.0070.04017.92
5.5.280.0100.05320.99
5.5.270.0170.04720.78
5.5.260.0000.04320.78
5.5.250.0000.09020.70
5.5.240.0130.06020.27
5.4.450.0270.04319.46
5.4.440.0200.05319.58
5.4.430.0200.05019.56
5.4.420.0270.03319.41
5.4.410.0300.03719.02
5.4.400.0570.04019.16
5.4.390.0300.04019.06
5.4.380.0200.08718.73
5.4.370.0270.04718.48
5.4.360.0270.05318.56
5.4.350.0230.05718.74
5.4.340.0300.04318.56
5.4.320.0060.04512.46
5.4.310.0080.05212.46
5.4.300.0040.04112.46
5.4.290.0100.03712.46
5.4.280.0060.03712.36
5.4.270.0080.03512.36
5.4.260.0090.04012.36
5.4.250.0090.03712.36
5.4.240.0060.03712.36
5.4.230.0120.04012.36
5.4.220.0090.05612.35
5.4.210.0080.03812.36
5.4.200.0050.04212.36
5.4.190.0090.03412.35
5.4.180.0080.03612.35
5.4.170.0070.05212.36
5.4.160.0070.04512.36
5.4.150.0090.04712.36
5.4.140.0110.05212.04
5.4.130.0090.05312.02
5.4.120.0130.04011.98
5.4.110.0120.04711.98
5.4.100.0090.04711.98
5.4.90.0080.05711.98
5.4.80.0120.05211.98
5.4.70.0050.05611.98
5.4.60.0090.05211.97
5.4.50.0160.04511.98
5.4.40.0070.05311.96
5.4.30.0140.04711.96
5.4.20.0070.05211.96
5.4.10.0090.06011.96
5.4.00.0060.05311.45
5.3.290.0050.04312.80
5.3.280.0080.04012.71
5.3.270.0070.03912.72
5.3.260.0070.04112.72
5.3.250.0050.04012.72
5.3.240.0110.03712.72
5.3.230.0040.04912.71
5.3.220.0160.05212.68
5.3.210.0090.05512.68
5.3.200.0090.04212.68
5.3.190.0070.04312.68
5.3.180.0120.03212.68
5.3.170.0120.04812.67
5.3.160.0060.05412.68
5.3.150.0080.04612.67
5.3.140.0110.03612.66
5.3.130.0090.03912.66
5.3.120.0090.04012.66
5.3.110.0070.04012.66
5.3.100.0080.03612.12
5.3.90.0100.03312.09
5.3.80.0060.04012.08
5.3.70.0050.05212.08
5.3.60.0060.05212.07
5.3.50.0060.03612.02
5.3.40.0110.03312.01
5.3.30.0050.03711.98
5.3.20.0090.03411.75
5.3.10.0090.04611.72
5.3.00.0070.05211.70
5.2.170.0080.0409.18
5.2.160.0060.0429.18
5.2.150.0060.0359.18
5.2.140.0080.0319.18
5.2.130.0110.0369.14
5.2.120.0070.0319.14
5.2.110.0060.0299.14
5.2.100.0040.0309.14
5.2.90.0040.0309.14
5.2.80.0030.0339.14
5.2.70.0060.0319.14
5.2.60.0020.0339.09
5.2.50.0080.0289.06
5.2.40.0050.0289.03
5.2.30.0050.0299.01
5.2.20.0030.0309.01
5.2.10.0040.0288.93
5.2.00.0030.0308.79
5.1.60.0040.0248.07
5.1.50.0040.0248.07
5.1.40.0020.0268.05
5.1.30.0040.0268.40
5.1.20.0070.0238.42
5.1.10.0040.0258.14
5.1.00.0060.0238.14
5.0.50.0050.0186.62
5.0.40.0040.0196.48
5.0.30.0040.0386.29
5.0.20.0000.0226.26
5.0.10.0000.0236.25
5.0.00.0020.0326.23
4.4.90.0040.0144.78
4.4.80.0060.0124.76
4.4.70.0060.0144.75
4.4.60.0030.0164.75
4.4.50.0020.0164.77
4.4.40.0020.0264.71
4.4.30.0030.0154.76
4.4.20.0040.0144.84
4.4.10.0030.0154.85
4.4.00.0020.0264.76
4.3.110.0040.0144.67
4.3.100.0010.0164.67
4.3.90.0010.0164.63
4.3.80.0030.0244.59
4.3.70.0030.0144.63
4.3.60.0020.0154.63
4.3.50.0050.0144.63
4.3.40.0030.0244.54
4.3.30.0000.0183.28
4.3.20.0030.0153.26
4.3.10.0000.0183.22
4.3.00.0070.01713.95

preferences:
41.58 ms | 400 KiB | 5 Q