3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 'a'=>'b', 'b'=>'c', 'c'=>'d', 'd'=>'e', 'e'=>'f', 'f'=>'g' ); $s = microtime(true); for ($i = 0; $i < 100000; $i++) { sizeOf($arr); } print microtime(true) - $s . PHP_EOL; $s = microtime(true); for ($i = 0; $i < 100000; $i++) { count($arr); } print microtime(true) - $s;

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.0120.01514.84
7.3.120.0040.02114.45
7.3.110.0100.01414.55
7.3.100.0070.01114.64
7.3.90.0000.01314.80
7.3.80.0140.00715.00
7.3.70.0120.00914.74
7.3.60.0070.00614.52
7.3.50.0130.00614.64
7.3.40.0030.01614.82
7.3.30.0040.01514.84
7.3.20.0000.02016.73
7.3.10.0060.01516.79
7.3.00.0100.01016.52
7.2.250.0030.02315.28
7.2.240.0030.01915.07
7.2.230.0000.02014.55
7.2.220.0060.01115.22
7.2.210.0030.01014.81
7.2.200.0030.01814.96
7.2.190.0040.01415.09
7.2.180.0100.01015.17
7.2.170.0100.01415.02
7.2.00.0070.00719.14
7.1.330.0030.02616.05
7.1.320.0030.02715.75
7.1.310.0030.01715.74
7.1.300.0070.02015.87
7.1.290.0060.02615.66
7.1.280.0070.01815.79
7.1.270.0000.02615.86
7.1.260.0000.02815.87
7.1.70.0030.00917.09
7.1.60.0030.02419.23
7.1.50.0000.02916.96
7.1.00.0070.08322.56
7.0.200.0040.01516.78
7.0.60.0430.07320.02
7.0.50.0030.08017.90
7.0.40.0130.07020.08
7.0.30.0270.06020.42
7.0.20.0200.06720.42
7.0.10.0170.07020.12
7.0.00.0170.07319.94
5.6.280.0030.10720.89
5.6.210.0170.05720.66
5.6.200.0100.10318.12
5.6.190.0430.06720.44
5.6.180.0170.08720.29
5.6.170.0200.08020.30
5.6.160.0230.07720.43
5.6.150.0230.08320.43
5.6.140.0200.08720.46
5.6.130.0170.09020.27
5.6.120.0130.08320.14
5.6.110.0030.10020.41
5.6.100.0670.07720.05
5.6.90.0470.10320.13
5.6.80.0670.07719.81
5.6.70.0630.09719.82
5.6.60.0700.08019.47
5.6.50.0670.08319.89
5.6.40.0670.07719.90
5.6.30.0670.07719.81
5.6.20.0530.09019.86
5.6.10.0670.08319.81
5.6.00.0670.08319.64
5.5.350.0270.08320.52
5.5.340.0100.10717.92
5.5.330.0130.08020.39
5.5.320.0100.09320.11
5.5.310.0100.08720.41
5.5.300.0100.08719.89
5.5.290.0200.08720.22
5.5.280.0130.08319.87
5.5.270.0700.08020.02
5.5.260.0630.09020.09
5.5.250.0730.07719.68
5.5.240.0670.07719.67
5.5.230.0630.08019.45
5.5.220.0770.08719.58
5.5.210.0730.08319.50
5.5.200.0630.08319.24
5.5.190.0800.07019.46
5.5.180.0770.09319.63
5.5.160.0670.08719.57
5.5.150.0800.08019.61
5.5.140.0670.08019.48
5.5.130.0600.08319.57
5.5.120.0670.09019.57
5.5.110.0630.08019.60
5.5.100.0800.07019.54
5.5.90.0600.09019.50
5.5.80.0570.09019.53
5.5.70.0830.07319.18
5.5.60.0700.07319.46
5.5.50.0670.07719.54
5.5.40.0770.07319.50
5.5.30.0700.07019.27
5.5.20.0570.08319.48
5.5.10.0730.09319.11
5.5.00.0570.08319.52

preferences:
49.55 ms | 403 KiB | 5 Q