3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test1() { $s = microtime(true); $a = 15484; for ($i = 0; $i < 1000000; $i++) { $b = $a / 2; } return microtime(true) - $s; } function test2() { $s = microtime(true); $a = 15484; for ($i = 0; $i < 1000000; $i++) { $b = $a >> 1; } return microtime(true) - $s; } echo test1()."\n"; echo test2()."\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.00.0160.07114.78
7.3.120.0070.08314.95
7.3.110.0060.08414.87
7.3.100.0070.05514.69
7.3.90.0070.08514.94
7.3.80.0100.05214.85
7.3.70.0030.06014.94
7.3.60.0070.05314.49
7.3.50.0100.05214.68
7.3.40.0000.06114.91
7.3.30.0100.05314.66
7.3.20.0060.05516.67
7.3.10.0070.06116.68
7.3.00.0080.05716.72
7.2.250.0070.08714.95
7.2.240.0130.07914.82
7.2.230.0100.05414.94
7.2.220.0030.06214.98
7.2.210.0070.05815.04
7.2.200.0130.05515.05
7.2.190.0000.06615.24
7.2.180.0130.04914.89
7.2.170.0030.05815.05
7.2.130.0030.06116.78
7.2.120.0100.05816.80
7.2.110.0000.07416.77
7.2.100.0060.05916.99
7.2.90.0000.07116.93
7.2.80.0030.06117.09
7.2.70.0030.05916.74
7.2.60.0070.06216.96
7.2.50.0070.05717.01
7.2.40.0070.06216.63
7.2.30.0070.05716.82
7.2.20.0030.06317.00
7.2.10.0070.06217.09
7.2.00.0100.06117.83
7.1.330.0070.11515.98
7.1.320.0030.12215.69
7.1.310.0030.12115.63
7.1.300.0070.11915.63
7.1.290.0100.12515.75
7.1.280.0100.11715.91
7.1.270.0030.13715.71
7.1.260.0030.12315.56
7.1.250.0070.12715.65
7.1.70.0000.05917.34
7.1.60.0130.04919.46
7.1.50.0240.10134.77
7.1.00.0070.14322.55
7.0.200.0030.05416.99
7.0.140.0000.16022.09
7.0.60.0100.14320.07
7.0.50.0070.12017.89
7.0.40.0130.13320.18
7.0.30.0270.13320.24
7.0.20.0300.10720.30
7.0.10.0100.14320.33
7.0.00.0130.08320.22
5.6.280.0070.24321.09
5.6.210.0070.18020.66
5.6.200.0100.14318.23
5.6.190.0070.13320.61
5.6.180.0230.19720.42
5.6.170.0300.16320.54
5.6.160.0030.13720.46
5.6.150.0130.17018.17
5.6.140.0130.17718.17
5.6.130.0130.17018.18
5.6.120.0030.16321.00
5.6.110.0000.12720.99
5.6.100.0230.12721.03
5.6.90.0000.12020.89
5.6.80.0400.14720.39
5.6.70.4470.12020.39
5.5.350.0070.10020.46
5.5.340.0030.13018.04
5.5.330.0170.17320.19
5.5.320.0270.19320.31
5.5.310.0300.17020.27
5.5.300.0100.11717.99
5.5.290.0030.12318.09
5.5.280.0270.17020.88
5.5.270.0100.20720.87
5.5.260.0070.18320.96
5.5.250.0230.13020.44
5.5.240.0300.17020.20
5.4.450.0700.16319.44
5.4.440.0770.17719.30
5.4.430.0130.16319.15
5.4.420.0700.17719.48
5.4.410.0530.18019.02
5.4.400.0700.17719.21
5.4.390.0700.17019.34
5.4.380.0230.17318.74
5.4.370.0200.17318.85
5.4.360.0330.16718.59
5.4.350.0230.18018.84
5.4.340.0430.24718.79
5.4.320.0060.11912.51
5.4.310.0050.12312.50
5.4.300.0090.11912.50
5.4.290.0050.12412.48
5.4.280.0110.11812.38
5.4.270.0080.14412.39
5.4.260.0050.13112.39
5.4.250.0060.15712.39
5.4.240.0070.12712.38
5.4.230.0070.15512.38
5.4.220.0070.15212.38
5.4.210.0070.12712.38
5.4.200.0110.14212.38
5.4.190.0110.18112.37
5.4.180.0070.12712.37
5.4.170.0080.11912.38
5.4.160.0080.12412.38
5.4.150.0090.11912.37
5.4.140.0060.14012.05
5.4.130.0100.16512.04
5.4.120.0080.15312.00
5.4.110.0040.22212.00
5.4.100.0080.12512.00
5.4.90.0050.13311.99
5.4.80.0070.13112.00
5.4.70.0060.13612.00
5.4.60.0070.13711.99
5.4.50.0050.14111.99
5.4.40.0070.12311.98
5.4.30.0060.13311.98
5.4.20.0030.13211.98
5.4.10.0080.12711.98
5.4.00.0040.12511.47
5.3.290.0100.17212.80
5.3.280.0080.15412.71
5.3.270.0100.17612.72
5.3.260.0060.15612.72
5.3.250.0100.14712.72
5.3.240.0100.15612.72
5.3.230.0060.15912.71
5.3.220.0080.17412.68
5.3.210.0100.17212.68
5.3.200.0070.14412.68
5.3.190.0050.15012.68
5.3.180.0070.17612.68
5.3.170.0090.14612.67
5.3.160.0090.14512.67
5.3.150.0070.14812.67
5.3.140.0110.15112.66
5.3.130.0070.16912.66
5.3.120.0100.19512.66
5.3.110.0070.17112.66
5.3.100.0090.15212.13
5.3.90.0110.17012.12
5.3.80.0130.14712.10
5.3.70.0110.15412.10
5.3.60.0060.17012.09
5.3.50.0100.27612.04
5.3.40.0100.16212.03
5.3.30.0090.16811.99
5.3.20.0070.14711.77
5.3.10.0140.15111.73
5.3.00.0090.14811.72
5.2.170.0050.1849.23
5.2.160.0060.1789.23
5.2.150.0060.1879.23
5.2.140.0070.2139.22
5.2.130.0080.1899.18
5.2.120.0090.3069.18
5.2.110.0080.2279.19
5.2.100.0050.1879.18
5.2.90.0050.1969.19
5.2.80.0100.1899.18
5.2.70.0060.1989.18
5.2.60.0050.1799.14
5.2.50.0080.2139.11
5.2.40.0040.2709.09
5.2.30.0080.2319.06
5.2.20.0070.2179.04
5.2.10.0070.1748.96
5.2.00.0060.2458.83
5.1.60.0070.1898.11
5.1.50.0080.1868.11
5.1.40.0090.2288.09
5.1.30.0030.2448.44
5.1.20.0080.3268.46
5.1.10.0050.1798.18
5.1.00.0090.2478.19
5.0.50.0060.4886.66
5.0.40.0040.4946.52
5.0.30.0050.4856.33
5.0.20.0030.4366.30
5.0.10.0040.4886.28
5.0.00.0060.5206.27
4.4.90.0020.4484.78
4.4.80.0050.4584.76
4.4.70.0090.4464.75
4.4.60.0060.4444.76
4.4.50.0060.4304.77
4.4.40.0030.4654.71
4.4.30.0030.4984.76
4.4.20.0060.4774.85
4.4.10.0060.4524.85
4.4.00.0040.5374.76
4.3.110.0070.4624.67
4.3.100.0070.4554.66
4.3.90.0040.4734.64
4.3.80.0020.4944.59
4.3.70.0020.4674.63
4.3.60.0060.4584.63
4.3.50.0020.6334.63
4.3.40.0070.5824.54
4.3.30.0090.5343.34
4.3.20.0030.5203.32
4.3.10.0060.6803.28
4.3.00.0170.31310.31

preferences:
34.64 ms | 401 KiB | 5 Q