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"; echo 'Global relative difference true to \true ' . sprintf('%f.10', (($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('%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)*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.3.00.0000.01816.72
7.2.130.0030.01016.97
7.2.120.0040.00816.71
7.2.110.0030.01016.94
7.2.100.0070.00716.87
7.2.90.0080.00817.09
7.2.80.0030.00616.91
7.2.70.0070.00716.77
7.2.60.0070.01016.87
7.2.50.0100.00317.00
7.2.40.0070.00716.94
7.2.30.0070.00716.97
7.2.20.0130.00016.80
7.2.10.0100.00317.02
7.2.00.0070.00517.91
7.1.250.0060.00315.64
7.1.240.0040.00815.28
7.1.230.0110.00715.76
7.1.220.0070.00715.51
7.1.210.0030.00715.79
7.1.200.0000.01115.60
7.1.190.0040.00715.69
7.1.180.0070.00315.66
7.1.170.0090.00615.78
7.1.160.0050.00415.78
7.1.150.0080.00015.75
7.1.140.0000.01215.81
7.1.130.0100.00315.70
7.1.120.0000.00915.95
7.1.110.0030.00615.60
7.1.100.0060.00915.71
7.1.90.0060.00615.77
7.1.80.0100.00315.87
7.1.70.0000.00916.37
7.1.60.0130.00817.64
7.1.50.0120.01325.23
7.1.40.0000.01415.92
7.1.30.0040.00815.91
7.1.20.0080.00615.86
7.1.10.0170.00015.76
7.1.00.0050.04119.17
7.0.330.0060.00915.13
7.0.320.0000.01315.59
7.0.310.0040.01115.53
7.0.300.0040.01215.38
7.0.290.0000.01315.34
7.0.280.0030.00715.36
7.0.270.0040.01115.00
7.0.260.0070.00715.18
7.0.250.0060.00615.53
7.0.240.0100.00715.63
7.0.230.0030.01015.49
7.0.220.0050.00515.23
7.0.210.0030.01315.28
7.0.200.0390.00515.14
7.0.190.0100.00315.52
7.0.180.0070.00315.51
7.0.170.0000.01115.37
7.0.160.0120.00415.29
7.0.150.0080.00315.11
7.0.140.0080.03818.74
7.0.130.0100.00015.36
7.0.120.0070.00415.51
7.0.110.0040.01115.15
7.0.100.0080.00415.21
7.0.90.0060.00615.37
7.0.80.0040.00415.32
7.0.70.0080.00315.46
7.0.60.0090.04117.74
7.0.50.0050.04216.60
7.0.40.0080.04516.56
7.0.30.0130.02616.87
7.0.20.0120.02216.80
7.0.10.0050.02716.88
7.0.00.0060.03316.61
5.6.380.0070.00714.41
5.6.370.0000.00914.17
5.6.360.0000.00914.28
5.6.350.0040.00814.14
5.6.340.0030.00714.13
5.6.330.0000.00814.52
5.6.320.0030.00714.28
5.6.310.0040.00814.31
5.6.300.0090.00314.14
5.6.290.0070.00414.16
5.6.280.0110.03317.54
5.6.270.0080.00314.04
5.6.260.0080.00314.43
5.6.250.0000.01614.14
5.6.240.0030.01214.19
5.6.230.0060.00614.27
5.6.220.0110.00714.36
5.6.210.0020.04717.53
5.6.200.0030.02616.32
5.6.190.0030.04317.52
5.6.180.0190.03917.59
5.6.170.0120.04017.39
5.6.160.0060.04517.27
5.6.150.0060.02516.40
5.6.140.0110.03516.27
5.6.130.0030.03216.18
5.6.120.0100.02217.66
5.6.110.0080.02217.56
5.6.100.0130.03517.54
5.6.90.0120.04017.45
5.6.80.0130.04017.17
5.6.70.1650.02617.22
5.6.60.0000.01314.23
5.6.50.0080.00314.32
5.6.40.0000.01013.91
5.6.30.0080.00813.95
5.6.20.0030.00914.05
5.6.10.0030.01314.14
5.6.00.0030.01414.51
5.5.380.0030.00511.20
5.5.370.0050.00311.08
5.5.360.0080.00411.21
5.5.350.0120.04315.81
5.5.340.0070.02214.55
5.5.330.0050.03815.56
5.5.320.0180.03715.86
5.5.310.0080.02815.63
5.5.300.0050.04314.48
5.5.290.0060.03914.55
5.5.280.0020.02416.12
5.5.270.0070.02015.98
5.5.260.0100.02915.85
5.5.250.0050.04215.86
5.5.240.2100.02515.55
5.5.230.0060.00310.88
5.5.220.0030.00710.88
5.5.210.0050.00310.70
5.5.200.0030.00711.01
5.5.190.0020.00911.09
5.5.180.0050.00511.04
5.5.170.0000.00811.02
5.5.160.0030.00710.67
5.5.150.0060.00310.94
5.5.140.0090.00011.00
5.5.130.0060.00611.16
5.5.120.0060.00610.92
5.5.110.0030.00610.91
5.5.100.0000.01011.00
5.5.90.0000.00810.44
5.5.80.0040.00710.71
5.5.70.0080.00010.86
5.5.60.0030.00811.04
5.5.50.0110.00010.81
5.5.40.0050.00511.02
5.5.30.0040.00711.13
5.5.20.0030.00711.11
5.5.10.0030.00710.82
5.5.00.0030.00710.92
5.4.450.0180.03015.38
5.4.440.0100.02315.33
5.4.430.0170.02315.10
5.4.420.0080.02715.29
5.4.410.0280.01815.03
5.4.400.0130.02015.04
5.4.390.0280.02214.79
5.4.380.0050.03714.81
5.4.370.0180.02914.70
5.4.360.0160.02514.82
5.4.350.0220.02214.79
5.4.340.0080.03414.79
5.4.330.0000.01010.88
5.4.320.0070.02011.72
5.4.310.0060.02311.81
5.4.300.0060.02211.56
5.4.290.0020.02511.76
5.4.280.0050.02111.62
5.4.270.0070.02111.48
5.4.260.0080.01911.64
5.4.250.0060.02011.73
5.4.240.0050.02011.61
5.4.230.0060.02411.65
5.4.220.0050.02211.64
5.4.210.0100.01811.65
5.4.200.0080.02011.52
5.4.190.0040.02211.48
5.4.180.0060.02411.65
5.4.170.0070.01911.74
5.4.160.0060.01811.72
5.4.150.0050.02311.73
5.4.140.0030.02211.41
5.4.130.0050.02111.50
5.4.120.0050.02011.44
5.4.110.0030.02411.47
5.4.100.0090.02211.27
5.4.90.0060.02411.36
5.4.80.0040.02211.48
5.4.70.0040.02211.43
5.4.60.0050.01811.41
5.4.50.0050.02111.43
5.4.40.0030.02111.44
5.4.30.0070.01811.37
5.4.20.0060.02211.51
5.4.10.0060.02411.48
5.4.00.0050.02011.21
5.3.290.0040.02411.65
5.3.280.0060.02011.57
5.3.270.0050.02311.59
5.3.260.0060.02111.59
5.3.250.0040.02311.63
5.3.240.0040.02211.56
5.3.230.0060.02011.62
5.3.220.0070.02311.50
5.3.210.0040.02311.48
5.3.200.0030.02211.52
5.3.190.0040.02311.52
5.3.180.0100.01911.60
5.3.170.0050.02111.58
5.3.160.0050.02111.61
5.3.150.0020.02511.56
5.3.140.0060.02011.54
5.3.130.0020.02411.60
5.3.120.0060.02111.46
5.3.110.0050.02311.54
5.3.100.0050.02111.16
5.3.90.0070.02111.21
5.3.80.0040.02211.20
5.3.70.0020.02311.26
5.3.60.0060.01911.34
5.3.50.0040.02111.28
5.3.40.0080.01911.21
5.3.30.0040.02111.26
5.3.20.0070.02011.06
5.3.10.0060.02410.95
5.3.00.0080.01910.94
5.2.170.0030.0189.61
5.2.160.0050.0179.61
5.2.150.0040.0199.61
5.2.140.0040.0179.61
5.2.130.0040.0199.59
5.2.120.0060.0159.59
5.2.110.0040.0189.59
5.2.100.0040.0199.59
5.2.90.0030.0189.59
5.2.80.0050.0159.59
5.2.70.0020.0199.59
5.2.60.0070.0149.56
5.2.50.0040.0179.55
5.2.40.0040.0189.54
5.2.30.0050.0169.53
5.2.20.0040.0159.52
5.2.10.0050.0159.48
5.2.00.0050.0169.41
5.1.60.0030.0159.05
5.1.50.0040.0149.05
5.1.40.0020.0149.04
5.1.30.0010.0189.22
5.1.20.0030.0159.23
5.1.10.0040.0149.09
5.1.00.0050.0139.09
5.0.50.0040.0128.33
5.0.40.0020.0138.26
5.0.30.0040.0158.16
5.0.20.0040.0118.15
5.0.10.0020.0108.14
5.0.00.0030.0178.14
4.4.90.0020.0097.41
4.4.80.0030.0087.40
4.4.70.0020.0097.40
4.4.60.0030.0097.40
4.4.50.0020.0097.41
4.4.40.0040.0137.37
4.4.30.0020.0137.40
4.4.20.0020.0107.44
4.4.10.0020.0107.45
4.4.00.0010.0157.40
4.3.110.0010.0107.35
4.3.100.0030.0087.35
4.3.90.0020.0087.33
4.3.80.0040.0127.31
4.3.70.0040.0087.34
4.3.60.0010.0127.33
4.3.50.0030.0097.33
4.3.40.0030.0147.29
4.3.30.0010.0126.66
4.3.20.0040.0096.65
4.3.10.0020.0126.63
4.3.00.0040.00811.99

preferences:
32.07 ms | 401 KiB | 5 Q