3v4l.org

run code in 300+ PHP versions simultaneously
<?php class HelloWorld { readonly public string $say; public function __construct() { $this->say = 'Hello World'; } } class HelloNewWorld extends HelloWorld { public function __construct(readonly public string $say = 'Hello New World') { } } echo (new HelloWorld())->say . PHP_EOL; echo (new HelloNewWorld())->say . PHP_EOL;

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.4.120.0070.00320.52
8.4.110.0090.00822.51
8.4.100.0130.00817.65
8.4.90.0120.00820.70
8.4.80.0090.00218.58
8.4.70.0100.00919.17
8.4.60.0060.00218.77
8.4.50.0130.00918.82
8.4.40.0040.00417.98
8.4.30.0000.01818.88
8.4.20.0260.00317.53
8.4.10.0320.00317.44
8.3.250.0110.00818.94
8.3.240.0110.00816.61
8.3.230.0130.00616.62
8.3.220.0090.00819.16
8.3.210.0100.00516.65
8.3.200.0030.00616.61
8.3.190.0110.00717.05
8.3.180.0080.01117.12
8.3.170.0120.00617.32
8.3.160.0100.00618.27
8.3.150.0200.00216.56
8.3.140.0130.00616.39
8.3.130.0140.00516.43
8.3.120.0140.00516.61
8.3.110.0120.00716.47
8.3.100.0140.00717.36
8.3.90.0170.00316.42
8.3.80.0130.00816.43
8.3.70.0210.00217.36
8.3.60.0120.01016.42
8.3.50.0180.00416.47
8.3.40.0170.00217.28
8.3.30.0140.00217.35
8.3.20.0140.00317.39
8.3.10.0150.00417.20
8.3.00.0140.00118.11
8.2.290.0050.00718.96
8.2.280.0070.01118.30
8.2.270.0040.00419.73
8.2.260.0110.00716.25
8.2.250.0140.00316.61
8.2.240.0170.00216.32
8.2.230.0170.00116.15
8.2.220.0140.00517.26
8.2.210.0090.00916.15
8.2.200.0140.00416.48
8.2.190.0130.00516.61
8.2.180.0130.00516.23
8.2.170.0080.01217.60
8.2.160.0140.00617.45
8.2.150.0120.00717.37
8.2.140.0190.00017.26
8.2.130.0160.00217.21
8.2.120.0150.00417.21
8.2.110.0140.00517.17
8.2.100.0160.00217.40
8.2.90.0130.00718.41
8.2.80.0090.00817.32
8.2.70.0170.00217.21
8.2.60.0160.00217.19
8.2.50.0110.00617.24
8.2.40.0110.00518.33
8.2.30.0110.00617.41
8.2.20.0100.00717.33
8.2.10.0110.00617.06
8.2.00.0130.00317.25
8.1.320.0090.01017.81

preferences:
29.02 ms | 403 KiB | 5 Q