3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace { $s = 1; $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.4.10.0060.01315.10
7.4.00.0090.00915.11
7.3.130.0030.01314.86
7.3.120.0080.00814.94
7.3.110.0080.00715.08
7.3.100.0140.00114.99
7.3.90.0080.00814.93
7.3.80.0050.01115.01
7.3.70.0120.00114.71
7.3.60.0060.00614.85
7.3.50.0080.00814.71
7.3.40.0080.00814.78
7.3.30.0090.00314.90
7.3.20.0060.00816.51
7.3.10.0060.00616.61
7.3.00.0080.00816.71
7.2.260.0070.01115.27
7.2.250.0060.01214.97
7.2.240.0100.00715.16
7.2.230.0080.00714.92
7.2.220.0070.00715.08
7.2.210.0030.01215.11
7.2.200.0070.01115.06
7.2.190.0070.00515.09
7.2.180.0090.00814.91
7.2.170.0050.01115.10
7.2.160.0100.00714.84
7.2.150.0070.00716.96
7.2.140.0060.00616.93
7.2.130.0080.01116.69
7.2.120.0120.00016.97
7.2.110.0080.00516.87
7.2.100.0040.01116.91
7.2.90.0070.00716.90
7.2.80.0090.00616.71
7.2.70.0060.00916.92
7.2.60.0090.00016.73
7.2.50.0040.00816.74
7.2.40.0040.01117.04
7.2.30.0100.00316.64
7.2.20.0030.01116.50
7.2.10.0040.00816.86
7.2.00.0100.00717.00
7.1.330.0040.01115.53
7.1.320.0050.00915.51
7.1.310.0050.00815.93
7.1.300.0060.00915.80
7.1.290.0050.00715.78
7.1.280.0070.00615.84
7.1.270.0050.01015.74
7.1.260.0100.00215.80
7.1.250.0000.01915.75
7.1.240.0040.01115.79
7.1.230.0000.01315.57
7.1.220.0100.00315.69
7.1.210.0050.00515.76
7.1.200.0090.00615.42
7.1.190.0130.00015.60
7.1.180.0000.01715.57
7.1.170.0000.01315.70
7.1.160.0030.00715.82
7.1.150.0000.01015.71
7.1.140.0040.00415.61
7.1.130.0060.00315.80
7.1.120.0000.01115.55
7.1.110.0080.00615.82
7.1.100.0090.00615.72
7.1.90.0080.00615.84
7.1.80.0030.01415.93
7.1.70.0050.00516.42
7.1.60.0060.00616.47
7.1.50.0070.00816.31
7.1.40.0030.00915.50
7.1.30.0000.01415.82
7.1.20.0060.00315.80
7.1.10.0030.00615.42
7.1.00.0020.04319.15
7.0.330.0110.00315.27
7.0.320.0030.00915.07
7.0.310.0100.00715.38
7.0.300.0070.00715.32
7.0.290.0040.00415.50
7.0.280.0040.01115.28
7.0.270.0050.00515.33
7.0.260.0040.00715.30
7.0.250.0050.00515.43
7.0.240.0070.00715.48
7.0.230.0030.01215.28
7.0.220.0030.00915.20
7.0.210.0060.00615.39
7.0.200.0070.00816.09
7.0.190.0030.00615.41
7.0.180.0100.00315.21
7.0.170.0060.00615.27
7.0.160.0060.00615.28
7.0.150.0080.00315.32
7.0.140.0050.03718.65
7.0.130.0000.01415.52
7.0.120.0060.00615.50
7.0.110.0030.00915.38
7.0.100.0030.01315.33
7.0.90.0040.00415.50
7.0.80.0060.00315.19
7.0.70.0040.00415.42
7.0.60.0070.02117.60
7.0.50.0070.03316.76
7.0.40.0100.04216.70
7.0.30.0210.02616.60
7.0.20.0180.03216.75
7.0.10.0080.04616.55
7.0.00.0090.02016.67
5.6.400.0100.00714.13
5.6.390.0040.01414.61
5.6.380.0100.00614.27
5.6.370.0070.01014.57
5.6.360.0070.00714.49
5.6.350.0030.01014.55
5.6.340.0070.00414.52
5.6.330.0040.01214.29
5.6.320.0040.00714.04
5.6.310.0080.00414.16
5.6.300.0030.00614.44
5.6.290.0030.00714.61
5.6.280.0070.03517.60
5.6.270.0030.00814.49
5.6.260.0000.01714.33
5.6.250.0030.01214.36
5.6.240.0000.01014.13
5.6.230.0070.00714.36
5.6.220.0030.00614.39
5.6.210.0080.03117.36
5.6.200.0070.04016.19
5.6.190.0050.02617.53
5.6.180.0190.03017.22
5.6.170.0200.02517.34
5.6.160.0030.03717.33
5.6.150.0070.04516.12
5.6.140.0090.04216.25
5.6.130.0070.03016.27
5.6.120.0110.04117.58
5.6.110.0070.03817.52
5.6.100.0030.05217.54
5.6.90.0050.04617.76
5.6.80.0130.03517.13
5.6.70.0070.01014.09
5.6.60.0000.01114.18
5.6.50.0030.00814.17
5.6.40.0030.00714.07
5.6.30.0100.00714.09
5.6.20.0110.00414.24
5.6.10.0090.00614.46
5.6.00.0060.00914.15
5.5.380.0000.00914.54
5.5.370.0060.00613.99
5.5.360.0050.00514.30
5.5.350.0100.04517.41
5.5.340.0080.04315.95
5.5.330.0070.04517.13
5.5.320.0150.04017.22
5.5.310.0120.04417.33
5.5.300.0070.04416.29
5.5.290.0070.04216.12
5.5.280.0050.03017.65
5.5.270.0070.03117.61
5.5.260.0100.03817.48
5.5.250.0070.02217.54
5.5.240.0080.03717.16
5.5.230.0050.00514.14
5.5.220.0040.00414.19
5.5.210.0090.00414.25
5.5.200.0070.00714.11
5.5.190.0070.00714.32
5.5.180.0160.00013.88
5.5.170.0070.01114.37
5.5.160.0060.00914.33
5.5.150.0120.00614.28
5.5.140.0110.00314.35
5.5.130.0040.01214.33
5.5.120.0060.00914.25
5.5.110.0030.01214.05
5.5.100.0040.01114.29
5.5.90.0120.00314.11
5.5.80.0060.01214.41
5.5.70.0030.01114.40
5.5.60.0060.00314.25
5.5.50.0040.00713.98
5.5.40.0090.00614.14
5.5.30.0090.00614.34
5.5.20.0000.01114.06
5.5.10.0070.00314.11
5.5.00.0040.00814.20
5.4.450.0150.02515.28
5.4.440.0230.03015.07
5.4.430.0070.02315.17
5.4.420.0100.02615.11
5.4.410.0170.02315.00
5.4.400.0250.02115.01
5.4.390.0150.02914.88
5.4.380.0110.02914.67
5.4.370.0280.02214.98
5.4.360.0180.02514.63
5.4.350.0180.02814.81
5.4.340.0120.03114.83
5.4.330.0030.00911.15
5.4.320.0050.02311.71
5.4.310.0050.02111.76
5.4.300.0070.02011.58
5.4.290.0080.02011.56
5.4.280.0020.02111.77
5.4.270.0060.02211.62
5.4.260.0030.02711.62
5.4.250.0050.02611.70
5.4.240.0070.02011.73
5.4.230.0050.02311.62
5.4.220.0060.02011.74
5.4.210.0040.02711.62
5.4.200.0040.03011.56
5.4.190.0060.02311.72
5.4.180.0060.02311.60
5.4.170.0070.01911.67
5.4.160.0070.01911.51
5.4.150.0060.02211.71
5.4.140.0040.02411.51
5.4.130.0040.02211.51
5.4.120.0080.01811.63
5.4.110.0040.02511.47
5.4.100.0040.02411.36
5.4.90.0070.02011.40
5.4.80.0060.01911.46
5.4.70.0040.02111.33
5.4.60.0040.02111.54
5.4.50.0060.01911.35
5.4.40.0020.02211.50
5.4.30.0050.02111.50
5.4.20.0050.02111.55
5.4.10.0050.02511.49
5.4.00.0040.02311.22
5.3.290.0090.03812.80
5.3.280.0090.03612.70
5.3.270.0090.03712.73
5.3.260.0060.03912.72
5.3.250.0050.04112.72
5.3.240.0070.03812.72
5.3.230.0100.03512.71
5.3.220.0070.03812.68
5.3.210.0090.03612.68
5.3.200.0070.03712.68
5.3.190.0070.03712.68
5.3.180.0050.03812.68
5.3.170.0090.03412.67
5.3.160.0070.03712.67
5.3.150.0070.04312.67
5.3.140.0050.04412.66
5.3.130.0070.03912.66
5.3.120.0060.04312.66
5.3.110.0060.04212.66
5.3.100.0060.03812.12
5.3.90.0070.04412.09
5.3.80.0060.03712.08
5.3.70.0080.03712.08
5.3.60.0050.03812.06
5.3.50.0070.03612.02
5.3.40.0050.03812.02
5.3.30.0080.03411.97
5.3.20.0030.03911.75
5.3.10.0050.03711.72
5.3.00.0100.03311.70
5.2.170.0090.0339.18
5.2.160.0070.0279.18
5.2.150.0040.0319.18
5.2.140.0050.0309.18
5.2.130.0050.0299.14
5.2.120.0060.0419.14
5.2.110.0050.0359.15
5.2.100.0030.0309.14
5.2.90.0060.0339.14
5.2.80.0070.0279.14
5.2.70.0070.0289.14
5.2.60.0040.0329.09
5.2.50.0050.0299.06
5.2.40.0100.0269.03
5.2.30.0080.0319.01
5.2.20.0040.0299.00
5.2.10.0090.0248.92
5.2.00.0110.0298.79
5.1.60.0050.0258.07
5.1.50.0070.0228.06
5.1.40.0100.0198.05
5.1.30.0070.0248.40
5.1.20.0050.0278.42
5.1.10.0050.0258.14
5.1.00.0060.0248.14
5.0.50.0040.0206.63
5.0.40.0050.0186.48
5.0.30.0060.0296.29
5.0.20.0070.0256.27
5.0.10.0030.0216.24
5.0.00.0050.0296.24
4.4.90.0040.0144.78
4.4.80.0050.0134.75
4.4.70.0030.0154.75
4.4.60.0040.0154.76
4.4.50.0030.0174.77
4.4.40.0050.0264.70
4.4.30.0040.0174.76
4.4.20.0020.0164.84
4.4.10.0040.0174.85
4.4.00.0030.0264.76
4.3.110.0020.0174.66
4.3.100.0050.0134.67
4.3.90.0040.0144.63
4.3.80.0020.0264.58
4.3.70.0050.0124.63
4.3.60.0010.0164.63
4.3.50.0040.0144.62
4.3.40.0040.0234.54
4.3.30.0020.0173.28
4.3.20.0020.0173.26
4.3.10.0020.0183.22
4.3.00.0030.02013.95

preferences:
35.77 ms | 401 KiB | 5 Q