3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace A\B; $a = [['x'], ['y'], ['z1'], 1, 2, 3, 4, 5, 'some text']; $time = microtime(true); for ($i=0; $i<1000000; $i++) { \count($a); } echo (microtime(true) - $time) . "\n"; $time = microtime(true); for ($i=0; $i<1000000; $i++) { count($a); } echo (microtime(true) - $time) . "\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)
8.3.00.0130.04028.09
8.2.130.0070.01528.09
8.2.120.0030.02028.09
8.2.110.0100.04428.09
8.2.100.0040.02228.09
8.2.90.0130.03528.09
8.2.80.0110.02528.09
8.2.70.0100.01328.09
8.2.60.0000.02328.09
8.2.50.0070.04728.09
8.2.40.0160.02228.09
8.2.30.0030.02028.09
8.2.20.0130.04728.09
8.2.10.0030.02028.09
8.2.00.0000.02328.09
8.1.260.0060.01628.09
8.1.250.0080.01528.09
8.1.240.0030.02028.09
8.1.230.0070.01628.09
8.1.220.0000.02228.09
8.1.210.0000.02228.09
8.1.200.0070.01528.09
8.1.190.0060.01628.09
8.1.180.0030.01928.09
8.1.170.0070.02128.09
8.1.160.0060.01628.09
8.1.150.0070.01728.09
8.1.140.0070.03328.09
8.1.130.0030.03328.09
8.1.120.0100.02028.09
8.1.110.0060.04928.09
8.1.100.0100.04728.09
8.1.90.0140.04128.09
8.1.80.0100.02628.09
8.1.70.0070.03522.80
8.1.60.0080.03322.83
8.1.50.0110.02522.76
8.1.40.0120.03222.75
8.1.30.0130.03821.11
8.1.20.0110.03421.09
8.1.10.0090.02921.04
8.1.00.0100.03720.95
8.0.300.0140.03528.09
8.0.290.0030.02028.09
8.0.280.0000.02428.09
8.0.270.0000.02428.09
8.0.260.0070.01628.09
8.0.250.0030.02028.09
8.0.240.0070.01728.09
8.0.230.0100.03628.09
8.0.220.0040.02228.09
8.0.210.0060.02228.09
8.0.200.0030.02722.47
8.0.190.0080.02122.49
8.0.180.0060.02222.50
8.0.170.0100.02122.50
8.0.160.0100.02620.59
8.0.150.0130.02420.53
8.0.140.0110.03820.58
8.0.130.0140.03120.58
8.0.120.0140.02820.58
8.0.110.0080.03819.71
8.0.100.0090.02919.66
8.0.90.0090.03619.60
8.0.80.0080.03419.70
8.0.70.0080.03019.61
8.0.60.0100.03519.65
8.0.50.0090.02819.61
8.0.30.0100.03519.15
8.0.20.0090.03519.87
8.0.10.0070.03119.75
8.0.00.0090.04018.70
7.4.330.0250.03128.09
7.4.320.0300.04828.09
7.4.300.0210.03922.29
7.4.290.0160.03022.32
7.4.280.0130.03220.34
7.4.270.0160.03720.40
7.4.260.0100.03620.41
7.4.250.0150.03520.36
7.4.240.0130.04319.42
7.4.230.0090.03719.48
7.4.220.0090.03619.44
7.4.210.0120.04118.49
7.4.200.0120.03219.38
7.4.190.0200.03220.47
7.4.180.0180.03620.41
7.4.160.0130.03920.44
7.4.150.0130.03320.37
7.4.140.0160.04219.73
7.4.130.0130.04319.43
7.4.120.0100.04218.83
7.4.110.0180.04119.43
7.4.100.0140.05019.42
7.4.90.0080.03919.37
7.4.80.0150.04220.10
7.4.70.0100.04119.33
7.4.60.0140.03519.34
7.4.50.0100.03819.33
7.4.40.0140.03819.36
7.4.30.0140.03820.27
7.4.20.0090.05118.65
7.4.10.0130.04318.81
7.4.00.0110.04818.22
7.3.330.0200.03920.09
7.3.320.0140.04320.19
7.3.310.0090.05120.16
7.3.300.0090.04419.14
7.3.290.0090.03919.27
7.3.280.0110.05618.23
7.3.270.0100.04720.25
7.3.260.0090.05517.84
7.3.250.0120.03820.18
7.3.240.0120.05118.05
7.3.230.0150.04319.36
7.3.220.0190.04620.17
7.3.210.0120.04719.15
7.3.200.0120.04519.24
7.3.190.0110.04719.26
7.3.180.0170.04119.15
7.3.170.0100.06319.19
7.3.160.0130.04219.21
7.3.150.0130.03720.24
7.3.140.0140.04920.13
7.3.130.0130.04818.70
7.3.120.0130.04818.72
7.3.110.0120.05918.49
7.3.100.0100.06017.98
7.3.90.0110.05318.06
7.3.80.0100.05117.53
7.3.70.0130.05317.57
7.3.60.0120.04917.55
7.3.50.0130.05117.21
7.3.40.0110.05417.23
7.3.30.0090.04515.44
7.3.20.1310.05016.01
7.3.10.1310.04615.97
7.3.00.1810.04816.00
7.2.340.0130.04020.31
7.2.330.0140.05919.48
7.2.320.0090.04919.31
7.2.310.0100.04719.36
7.2.300.0180.05119.43
7.2.290.0160.04819.38
7.2.280.0160.03620.35
7.2.270.0140.04420.18
7.2.260.0100.05518.77
7.2.250.0120.05318.65
7.2.240.0150.05618.73
7.2.230.0140.06718.08
7.2.220.0090.05518.17
7.2.210.0130.05917.81
7.2.200.0110.06417.68
7.2.190.0110.05917.73
7.2.180.0100.05417.42
7.2.170.0110.05017.42
7.2.160.0100.05015.68
7.2.150.3190.05516.18
7.2.140.1300.05016.21
7.2.130.1340.04816.18
7.2.120.1460.05316.23
7.2.110.2050.04916.22
7.2.100.2360.04916.23
7.2.90.1740.05116.24
7.2.80.1250.05216.22
7.2.70.1130.05316.14
7.2.60.2400.05116.16
7.2.50.1280.04916.21
7.2.40.1180.05116.17
7.2.30.1710.05116.22
7.2.20.1580.05116.24
7.2.10.1940.05216.20
7.2.00.1870.04916.23
7.1.330.0110.06818.35
7.1.320.0100.08917.91
7.1.310.0140.07817.42
7.1.300.0100.08017.44
7.1.290.0120.08317.38
7.1.280.0100.07317.04
7.1.270.2240.06415.10
7.1.260.1080.06315.09
7.1.250.1150.07115.14
7.1.240.0170.06518.32
7.1.230.0110.06818.30
7.1.220.0110.07518.38
7.1.210.0130.07418.29
7.1.200.0110.07018.23
7.1.190.0150.08018.40
7.1.180.0090.07918.25
7.1.170.0110.08018.23
7.1.160.0130.08618.29
7.1.150.0090.07118.28
7.1.140.0120.07218.32
7.1.130.0100.07618.29
7.1.120.0140.07918.23
7.1.110.0070.07418.36
7.1.100.0100.06618.36
7.1.90.0100.08218.43
7.1.80.0090.07018.36
7.1.70.0110.06318.19
7.1.60.0130.06718.36
7.1.50.0150.07218.34
7.1.40.0090.07718.38
7.1.30.0090.07618.21
7.1.20.0140.06318.29
7.1.10.0110.06318.24
7.1.00.0120.08118.17

preferences:
27.55 ms | 403 KiB | 5 Q