3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __construct( public readonly int $a = 5, ) { echo 2; yield; echo 3; } } class B extends A { public function __construct(int $a) { echo 1; parent::__construct($a); echo 4; } } echo (new B(6))->a;

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.5.30.0100.00819.57
8.5.20.0050.00220.29
8.5.10.0090.01116.73
8.5.00.0120.00920.04
8.4.180.0130.00919.37
8.4.170.0140.00920.51
8.4.160.0160.00720.60
8.4.150.0080.00416.90
8.4.140.0140.00817.63
8.4.130.0130.00618.70
8.4.120.0130.00720.39
8.4.110.0110.00919.13
8.4.100.0110.01017.81
8.4.90.0130.00720.33
8.4.80.0030.00518.82
8.4.70.0120.00822.25
8.4.60.0090.01020.59
8.4.50.0110.00618.81
8.4.40.0140.00717.29
8.4.30.0130.00720.52
8.4.20.0030.00717.77
8.4.10.0040.01219.38
8.3.300.0140.00619.25
8.3.290.0140.00620.71
8.3.280.0140.00818.37
8.3.270.0100.01016.86
8.3.260.0100.01016.54
8.3.250.0100.00916.66
8.3.240.0100.00916.86
8.3.230.0060.01216.55
8.3.220.0120.00618.88
8.3.210.0100.00816.68
8.3.200.0060.00316.59
8.3.190.0120.01017.04
8.3.180.0090.01018.85
8.3.170.0120.00617.01
8.3.160.0110.00716.77
8.3.150.0110.00716.62
8.3.140.0040.01416.46
8.3.130.0070.00318.44
8.3.120.0090.00020.82
8.3.110.0050.00316.64
8.3.100.0100.01016.62
8.3.90.0060.00316.78
8.3.50.0120.00316.37
8.2.300.0100.01220.45
8.2.290.0130.00417.02
8.2.280.0110.00818.40
8.2.270.0090.00616.53
8.2.260.0110.00417.06
8.2.250.0040.00416.80
8.2.240.0030.00617.13
8.2.230.0100.00020.94
8.2.220.0030.00616.60
8.2.210.0090.00016.45
8.2.110.0090.01120.72
8.1.340.0100.00920.23
8.1.330.0110.01015.89
8.1.320.0110.00817.94
8.1.310.0100.00718.42
8.1.300.0060.00316.04
8.1.240.0140.00818.50
7.3.330.0110.00717.08

preferences:
64.13 ms | 744 KiB | 5 Q