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', (($n2-$n1)*100)/$n1) . "%\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.4.10.0030.01514.79
7.4.00.0080.01014.84
7.3.130.0080.01114.91
7.3.120.0040.01214.77
7.3.110.0110.00614.94
7.3.100.0110.00514.90
7.3.90.0090.00614.85
7.3.80.0110.00414.92
7.3.70.0040.01114.74
7.3.60.0040.00814.79
7.3.50.0050.00914.84
7.3.40.0080.00714.82
7.3.30.0030.01114.86
7.3.20.0100.00516.56
7.3.10.0090.00616.65
7.3.00.0120.00816.65
7.2.260.0130.00515.12
7.2.250.0090.00815.06
7.2.240.0080.01015.08
7.2.230.0070.00714.94
7.2.220.0070.00715.11
7.2.210.0030.01215.02
7.2.200.0080.00914.75
7.2.190.0050.00814.92
7.2.180.0070.00715.15
7.2.170.0040.00815.09
7.2.160.0080.00514.90
7.2.150.0090.00916.86
7.2.140.0060.00817.01
7.2.130.0060.01016.82
7.2.120.0110.00816.76
7.2.110.0070.01016.82
7.2.100.0080.00916.75
7.2.90.0090.00716.85
7.2.80.0050.01016.74
7.2.70.0070.00916.90
7.2.60.0050.00816.92
7.2.50.0050.00916.86
7.2.40.0100.00516.79
7.2.30.0050.01016.82
7.2.20.0040.00916.90
7.2.10.0070.00916.88
7.2.00.0050.00817.38
7.1.330.0050.00915.76
7.1.320.0070.00915.65
7.1.310.0060.00915.72
7.1.300.0060.00715.65
7.1.290.0060.00715.85
7.1.280.0030.00915.74
7.1.270.0080.00715.58
7.1.260.0090.00615.79
7.1.250.0060.00715.81
7.1.240.0040.01115.69
7.1.230.0080.00615.66
7.1.220.0040.00915.68
7.1.210.0080.00615.68
7.1.200.0060.00915.54
7.1.190.0070.00715.64
7.1.180.0030.00915.79
7.1.170.0080.00615.57
7.1.160.0090.00715.67
7.1.150.0090.00615.48
7.1.140.0050.00715.66
7.1.130.0100.00515.65
7.1.120.0070.00715.75
7.1.110.0070.00615.80
7.1.100.0070.00815.68
7.1.90.0000.01315.73
7.1.80.0080.00715.81
7.1.70.0030.00916.11
7.1.60.0050.00916.72
7.1.50.0060.00915.87
7.1.40.0070.00615.85
7.1.30.0090.00415.54
7.1.20.0060.00515.62
7.1.10.0060.00515.66
7.1.00.0070.02317.28
7.0.330.0070.00615.33
7.0.320.0050.00815.23
7.0.310.0060.00715.32
7.0.300.0080.00715.41
7.0.290.0040.00715.38
7.0.280.0020.00915.17
7.0.270.0070.00715.38
7.0.260.0070.00715.25
7.0.250.0080.00615.51
7.0.240.0070.00715.44
7.0.230.0040.01115.40
7.0.220.0050.00815.25
7.0.210.0060.00915.44
7.0.200.0190.00715.11
7.0.190.0050.00815.40
7.0.180.0030.01215.38
7.0.170.0070.00515.27
7.0.160.0060.00915.48
7.0.150.0070.00415.36
7.0.140.0080.02116.99
7.0.130.0040.00715.25
7.0.120.0070.00615.49
7.0.110.0050.00615.51
7.0.100.0070.00715.43
7.0.90.0080.00515.31
7.0.80.0070.00515.39
7.0.70.0060.00815.42
7.0.60.0070.01616.54
7.0.50.0030.01916.16
7.0.40.0090.02615.17
7.0.30.0130.01815.15
7.0.20.0130.01515.10
7.0.10.0130.02215.13
7.0.00.0040.03015.11
5.6.400.0070.00814.54
5.6.390.0070.00914.22
5.6.380.0060.00614.19
5.6.370.0090.00614.11
5.6.360.0060.01214.31
5.6.350.0020.01014.26
5.6.340.0080.00514.31
5.6.330.0010.01414.21
5.6.320.0090.00514.40
5.6.310.0050.00914.34
5.6.300.0050.00814.10
5.6.290.0040.01014.47
5.6.280.0060.02315.89
5.6.270.0030.00914.47
5.6.260.0030.01114.29
5.6.250.0020.01414.39
5.6.240.0070.00714.36
5.6.230.0070.00714.29
5.6.220.0070.00914.27
5.6.210.0090.02515.89
5.6.200.0050.02615.21
5.6.190.0060.02915.84
5.6.180.1070.02115.84
5.6.170.0100.01615.84
5.6.160.0060.02815.72
5.6.150.0070.02515.33
5.6.140.0050.02615.32
5.6.130.0070.01815.29
5.6.120.0100.02616.02
5.6.110.0110.02415.98
5.6.100.0050.01815.92
5.6.90.0070.01616.02
5.6.80.0040.02315.85
5.6.70.0030.02615.70
5.6.60.0040.01014.30
5.6.50.0010.01214.12
5.6.40.0080.00614.34
5.6.30.0090.00714.30
5.6.20.0070.00914.29
5.6.10.0100.00414.26
5.6.00.0090.00514.30
5.5.380.0020.00814.21
5.5.370.0080.00614.14
5.5.360.0080.00614.23
5.5.350.0040.02715.69
5.5.340.0050.02115.15
5.5.330.0060.02115.75
5.5.320.0130.01615.69
5.5.310.0100.02315.74
5.5.300.0070.01915.09
5.5.290.0060.01814.96
5.5.280.0070.02815.68
5.5.270.0080.01715.92
5.5.260.0050.02915.80
5.5.250.0110.01815.73
5.5.240.0080.02415.77
5.5.230.0090.00513.99
5.5.220.0060.00813.94
5.5.210.0050.01013.95
5.5.200.0030.01014.03
5.5.190.0050.00914.08
5.5.180.0080.00614.26
5.5.170.0060.00713.94
5.5.160.0050.00514.04
5.5.150.0080.00714.23
5.5.140.0070.00714.18
5.5.130.0070.00613.97
5.5.120.0090.00614.04
5.5.110.0050.00914.09
5.5.100.0070.00713.97
5.5.90.0080.00914.01
5.5.80.0070.00514.00
5.5.70.0060.00814.04
5.5.60.0070.00814.11
5.5.50.0040.01013.98
5.5.40.0040.00914.13
5.5.30.0090.00614.13
5.5.20.0100.00613.99
5.5.10.0050.01014.13
5.5.00.0060.00714.24
5.4.450.0170.01513.15
5.4.440.0050.01413.13
5.4.430.0160.01713.10
5.4.420.0140.01513.00
5.4.410.0150.01413.01
5.4.400.0080.01612.97
5.4.390.0040.02012.85
5.4.380.0140.02112.70
5.4.370.0130.01912.76
5.4.360.0120.01512.69
5.4.350.0100.01712.87
5.4.340.0080.02112.87
5.4.330.0040.00510.88
5.4.320.0040.01511.14
5.4.310.0050.01511.19
5.4.300.0040.01511.22
5.4.290.0060.01611.14
5.4.280.0040.01411.20
5.4.270.0050.01411.16
5.4.260.0070.01311.23
5.4.250.0040.01811.29
5.4.240.0040.01511.21
5.4.230.0060.01311.15
5.4.220.0050.01611.21
5.4.210.0060.01611.15
5.4.200.0040.01611.20
5.4.190.0050.01311.15
5.4.180.0030.01611.08
5.4.170.0060.01311.06
5.4.160.0060.01311.01
5.4.150.0040.01511.07
5.4.140.0040.01511.03
5.4.130.0040.01411.05
5.4.120.0080.01411.02
5.4.110.0070.01411.13
5.4.100.0050.01211.16
5.4.90.0040.01411.10
5.4.80.0040.01411.07
5.4.70.0070.01111.07
5.4.60.0060.01511.19
5.4.50.0050.01711.11
5.4.40.0060.01311.04
5.4.30.0050.01311.08
5.4.20.0040.01511.11
5.4.10.0030.01511.12
5.4.00.0040.01510.93
5.3.290.0050.04212.80
5.3.280.0060.03912.71
5.3.270.0090.03812.72
5.3.260.0090.03712.72
5.3.250.0090.03512.72
5.3.240.0060.03812.72
5.3.230.0060.04012.71
5.3.220.0120.04112.68
5.3.210.0050.04212.68
5.3.200.0060.03712.68
5.3.190.0120.04312.68
5.3.180.0060.03912.67
5.3.170.0060.03812.67
5.3.160.0090.03412.67
5.3.150.0100.03412.67
5.3.140.0090.04512.66
5.3.130.0080.03712.66
5.3.120.0060.03912.66
5.3.110.0070.03812.66
5.3.100.0090.03412.12
5.3.90.0060.03612.09
5.3.80.0050.03812.09
5.3.70.0030.04012.08
5.3.60.0060.03712.07
5.3.50.0070.03812.02
5.3.40.0070.03712.02
5.3.30.0070.03611.98
5.3.20.0060.04511.76
5.3.10.0070.04111.72
5.3.00.0050.03811.71
5.2.170.0070.0299.18
5.2.160.0050.0299.18
5.2.150.0090.0269.19
5.2.140.0100.0269.18
5.2.130.0050.0339.14
5.2.120.0080.0259.14
5.2.110.0070.0269.15
5.2.100.0040.0299.14
5.2.90.0030.0319.14
5.2.80.0040.0319.14
5.2.70.0080.0329.14
5.2.60.0050.0299.09
5.2.50.0050.0319.06
5.2.40.0060.0299.04
5.2.30.0030.0329.02
5.2.20.0060.0379.00
5.2.10.0020.0308.92
5.2.00.0050.0288.78
5.1.60.0060.0228.07
5.1.50.0030.0258.06
5.1.40.0080.0258.05
5.1.30.0070.0238.39
5.1.20.0060.0268.42
5.1.10.0070.0348.14
5.1.00.0090.0348.14
5.0.50.0030.0216.62
5.0.40.0030.0226.48
5.0.30.0030.0336.29
5.0.20.0030.0216.26
5.0.10.0050.0196.25
5.0.00.0030.0356.23
4.4.90.0020.0174.78
4.4.80.0020.0174.75
4.4.70.0020.0194.75
4.4.60.0040.0154.75
4.4.50.0020.0164.77
4.4.40.0040.0234.71
4.4.30.0030.0184.75
4.4.20.0050.0184.85
4.4.10.0040.0154.85
4.4.00.0040.0244.76
4.3.110.0010.0174.67
4.3.100.0050.0124.66
4.3.90.0000.0174.64
4.3.80.0040.0234.58
4.3.70.0020.0154.63
4.3.60.0050.0124.63
4.3.50.0030.0154.63
4.3.40.0010.0264.54
4.3.30.0010.0163.28
4.3.20.0030.0173.26
4.3.10.0010.0173.22
4.3.00.0070.01313.95

preferences:
36.35 ms | 401 KiB | 5 Q