3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('constant', 'value'); class x { static $z = array(); static public function x($z) { self::$z[] = $z; } } foreach(range(1,500000) as $x) { x:x($x); }

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.60.0100.00726.30
8.3.50.0180.00926.09
8.3.40.0090.01226.46
8.3.30.0100.01327.79
8.3.20.0080.00426.44
8.3.10.0000.01128.63
8.3.00.0060.00327.72
8.2.180.0160.00624.13
8.2.170.0090.01226.43
8.2.160.0140.00728.08
8.2.150.0060.00626.58
8.2.140.0080.00428.20
8.2.130.0050.00330.21
8.2.120.0070.00727.26
8.2.110.0140.01030.18
8.2.100.0200.01026.35
8.1.280.0170.01333.20
8.1.270.0120.00437.48
8.1.260.0120.00335.58
8.1.250.0070.00739.24
8.1.240.0130.01035.65
8.1.230.0170.00333.79
5.4.210.0100.03412.40
5.4.200.0120.04212.38
5.4.190.0090.04612.38
5.4.180.0150.04312.38
5.4.170.0120.04812.39
5.4.160.0140.04412.39
5.4.150.0160.04112.38
5.4.140.0110.04712.07
5.4.130.0140.04312.05
5.4.120.0200.05212.01
5.4.110.0130.03912.01
5.4.100.0110.04212.01
5.4.90.0110.04312.01
5.4.80.0100.04612.01
5.4.70.0120.04112.01
5.4.60.0150.05712.00
5.4.50.0130.04412.00
5.4.40.0140.04311.99
5.4.30.0100.04311.99
5.4.20.0100.04311.99
5.4.10.0110.04111.99
5.4.00.0120.04311.48
5.3.270.0130.04312.72
5.3.260.0130.04212.72
5.3.250.0080.04312.72
5.3.240.0120.04312.72
5.3.230.0120.04812.71
5.3.220.0120.04712.68
5.3.210.0130.04712.68
5.3.200.0160.04412.68
5.3.190.0150.04512.68
5.3.180.0160.04212.67
5.3.170.0130.04612.67
5.3.160.0130.04612.67
5.3.150.0120.04712.68
5.3.140.0140.04612.66
5.3.130.0180.07312.66
5.3.120.0170.05012.66
5.3.110.0140.05012.66
5.3.100.0140.04512.12
5.3.90.0110.04712.09
5.3.80.0100.04312.09
5.3.70.0150.03812.08
5.3.60.0120.04312.07
5.3.50.0160.05812.01
5.3.40.0130.04212.01
5.3.30.0100.04511.97
5.3.20.0120.05911.75
5.3.10.0100.04511.72
5.3.00.0120.04311.70

preferences:
33.11 ms | 401 KiB | 5 Q