3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = [0, 0, 0, 0];for($i = 0; $i < 50; ++$i){ $k = 0; $t = microtime(true); $x = 0; for($j = 0; $j < 100000; ++$j) ++$x; $time[$k++] += microtime(true) - $t; $t = microtime(true); $x = 0; for($j = 0; $j < 100000; ++$j) $x++; $time[$k++] += microtime(true) - $t; $t = microtime(true); $x = 0; for($j = 0; $j < 100000; ++$j) $x += 1; $time[$k++] += microtime(true) - $t; $t = microtime(true); $x = 0; for($j = 0; $j < 100000; ++$j) $x = $x + 1; $time[$k++] += microtime(true) - $t; } echo '++$x: ', $time[0] * 1000, 'ms<br />'; echo '$x++: ', $time[1] * 1000, 'ms<br />'; echo '$x += 1: ', $time[2] * 1000, 'ms<br />'; echo '$x = $x + 1: ', $time[3] * 1000, 'ms<br />';

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.0070.22119.67
7.1.70.0030.27417.02
7.1.60.0070.25819.40
7.1.50.0070.24816.70
7.1.00.0070.32022.42
7.0.200.0030.24216.39
7.0.140.0100.30022.12
7.0.60.0030.26319.91
7.0.50.0000.27017.87
7.0.40.0130.29720.23
7.0.30.0270.28320.09
7.0.20.0270.29320.20
7.0.10.0030.24720.01
7.0.00.0070.28020.01
5.6.280.0000.89321.03
5.6.210.0130.66320.68
5.6.200.0100.56318.11
5.6.190.0130.58720.57
5.6.180.0300.57020.61
5.6.170.0270.57320.56
5.6.160.0000.52320.33
5.6.150.0070.60318.18
5.6.140.0030.55318.12
5.6.130.0000.53318.17
5.6.120.0100.58321.14
5.6.110.0130.60321.02
5.6.100.0100.52021.13
5.6.90.0100.58021.13
5.6.80.0130.58720.48
5.5.350.0230.53320.43
5.5.340.0070.57018.00
5.5.330.0070.58020.23
5.5.320.0270.58320.28
5.5.310.0330.59720.28
5.5.300.0030.57718.00
5.5.290.0100.59317.91
5.5.280.0030.58020.80
5.5.270.0130.57720.90
5.5.260.0030.61020.73
5.5.250.0130.61320.77
5.5.240.0030.43720.12
5.4.450.0730.93019.63
5.4.440.0101.02719.62
5.4.430.0200.91319.42
5.4.420.0101.03719.52
5.4.410.0100.87719.00
5.4.400.0270.95018.74
5.4.390.0370.93318.50
5.4.380.0130.88318.68
5.4.370.0100.67318.50
5.4.360.0070.65718.61
5.4.350.0190.82811.98
5.4.340.0080.75311.98
5.4.320.0040.66512.46
5.4.310.0070.66712.46
5.4.300.0040.67812.46
5.4.290.0100.66212.46
5.4.280.0050.67212.36
5.4.270.0040.68312.36
5.4.260.0100.67212.36
5.4.250.0050.67312.36
5.4.240.0080.65912.36
5.4.230.0110.75512.35
5.4.220.0070.66712.35
5.4.210.0060.65612.35
5.4.200.0080.65912.35
5.4.190.0060.66312.35
5.4.180.0120.65612.35
5.4.170.0110.63912.36
5.4.160.0060.65212.35
5.4.150.0110.65112.35
5.4.140.0030.67112.04
5.4.130.0070.65412.02
5.4.120.0030.66311.98
5.4.110.0090.65811.97
5.4.100.0060.67011.98
5.4.90.0050.66711.98
5.4.80.0100.66811.97
5.4.70.0070.66511.97
5.4.60.0070.83811.97
5.4.50.0080.74411.97
5.4.40.0050.66711.96
5.4.30.0100.75611.96
5.4.20.0090.70511.96
5.4.10.0060.75011.96
5.4.00.0050.65611.45
5.3.290.0040.04212.80
5.3.280.0030.04012.71
5.3.270.0050.03912.73
5.3.260.0030.04012.72
5.3.250.0040.03712.72
5.3.240.0090.03312.72
5.3.230.0090.03412.71
5.3.220.0040.03912.68
5.3.210.0040.04012.68
5.3.200.0070.04112.68
5.3.190.0030.04012.68
5.3.180.0070.03512.67
5.3.170.0060.03612.67
5.3.160.0060.03612.67
5.3.150.0040.04012.67
5.3.140.0090.03212.66
5.3.130.0030.04212.66
5.3.120.0050.04012.66
5.3.110.0090.04212.66
5.3.100.0040.03812.12
5.3.90.0090.03512.08
5.3.80.0060.03712.07
5.3.70.0050.03712.07
5.3.60.0040.03712.06
5.3.50.0060.03512.00
5.3.40.0040.03812.00
5.3.30.0040.03611.95
5.3.20.0030.03711.72
5.3.10.0060.03811.70
5.3.00.0090.03811.68
5.2.170.0080.0289.18
5.2.160.0080.0319.18
5.2.150.0070.0409.18
5.2.140.0070.0299.18
5.2.130.0040.0299.14
5.2.120.0040.0299.14
5.2.110.0040.0309.14
5.2.100.0070.0379.14
5.2.90.0060.0289.14
5.2.80.0080.0299.14
5.2.70.0050.0329.14
5.2.60.0080.0309.09
5.2.50.0040.0309.05
5.2.40.0050.0289.03
5.2.30.0020.0319.01
5.2.20.0030.0299.00
5.2.10.0070.0248.92
5.2.00.0030.0308.79
5.1.60.0080.0198.07
5.1.50.0050.0238.06
5.1.40.0050.0238.05
5.1.30.0020.0328.40
5.1.20.0050.0258.41
5.1.10.0050.0248.14
5.1.00.0050.0258.14
5.0.50.0050.0196.62
5.0.40.0040.0186.48
5.0.30.0020.0356.29
5.0.20.0040.0236.27
5.0.10.0030.0206.25
5.0.00.0020.0326.24
4.4.90.0020.0174.78
4.4.80.0030.0144.76
4.4.70.0020.0164.75
4.4.60.0030.0204.76
4.4.50.0020.0164.77
4.4.40.0000.0284.71
4.4.30.0040.0164.76
4.4.20.0040.0164.84
4.4.10.0030.0234.85
4.4.00.0030.0324.76
4.3.110.0000.0184.67
4.3.100.0020.0154.67
4.3.90.0010.0234.63
4.3.80.0040.0234.58
4.3.70.0030.0144.63
4.3.60.0020.0194.63
4.3.50.0020.0194.63
4.3.40.0030.0304.54
4.3.30.0010.0223.28
4.3.20.0000.0173.26
4.3.10.0000.0173.22
4.3.00.0100.0237.12

preferences:
36.42 ms | 401 KiB | 5 Q