3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A {} class B {} class C { public function __construct( protected readonly A|B $b ) { if ($this->b instanceof A) { trigger_error('A is deprecated, pass B instead', E_USER_DEPRECATED); $this->b = new B(); } var_dump($this->b); } } new C(new A()); new C(new B());

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.0100.00823.97
8.4.110.0090.00918.89
8.4.100.0040.00818.01
8.4.90.0120.00918.00
8.4.80.0130.00621.53
8.4.70.0120.00917.93
8.4.60.0040.00520.03
8.4.50.0050.00318.93
8.4.40.0070.01017.99
8.4.30.0030.01720.44
8.4.20.0140.00717.87
8.4.10.0160.00022.18
8.3.250.0080.00918.83
8.3.240.0050.00317.29
8.3.230.0100.01016.80
8.3.220.0100.00817.22
8.3.210.0130.00716.95
8.3.200.0100.01016.86
8.3.190.0050.01016.67
8.3.180.0120.00618.46
8.3.170.0050.00220.91
8.3.160.0030.01518.42
8.3.150.0150.00320.66
8.3.140.0000.01517.18
8.3.130.0040.00418.72
8.3.120.0080.00820.70
8.3.110.0000.00822.58
8.3.100.0090.00022.58
8.3.90.0080.00022.58
8.3.50.0040.00422.58
8.2.290.0080.00320.41
8.2.280.0040.00418.52
8.2.270.0140.00416.95
8.2.260.0140.00016.76
8.2.250.0050.00316.93
8.2.240.0080.01217.27
8.2.230.0000.00722.58
8.2.220.0090.00022.58
8.2.210.0050.00522.58
8.2.90.0280.01017.50
8.2.80.0280.00417.25
8.2.70.0190.01117.25
8.2.60.0290.00017.25
8.2.50.0230.00717.25
8.2.40.0260.00017.38
8.2.30.0260.00017.50
8.2.20.0210.00617.25
8.2.10.0300.00017.46
8.2.00.0210.00617.37
8.1.330.0110.00821.99
8.1.320.0110.00720.11
8.1.310.0080.00018.48
8.1.300.0090.00917.95
8.1.220.0210.00517.11
8.1.210.0180.01117.09
8.1.200.0210.00716.88
8.1.190.0220.00317.09
8.1.180.0280.00017.13
8.1.170.0170.01017.25
8.1.160.0190.00817.00
8.1.150.0150.01216.98
8.1.140.0210.00517.11
8.1.130.0230.00417.00
8.1.120.0230.00317.25
8.1.110.0250.00317.25
8.1.100.0200.00717.25
8.1.90.0270.00017.34
8.1.80.0270.00017.25
8.1.70.0250.00416.88
8.1.60.0250.00317.25
8.1.50.0220.00417.50
8.1.40.0220.00617.46
8.1.30.0150.01217.22
8.1.20.0190.00917.38
8.1.10.0240.00717.36
8.1.00.0240.00517.25
8.0.300.0200.00616.80
8.0.290.0200.00816.80
8.0.280.0190.00716.80
8.0.270.0260.00016.80
8.0.260.0220.00416.80
8.0.250.0270.00016.80
8.0.240.0260.00016.80
8.0.230.0170.01016.80
8.0.220.0210.00616.80
8.0.210.0210.00416.80
8.0.200.0210.00416.80
8.0.190.0170.01116.80
8.0.180.0250.00316.80
8.0.170.0250.00016.80
8.0.160.0250.00016.80
8.0.150.0260.00016.80
8.0.140.0180.00816.80
8.0.130.0190.00816.80
8.0.120.0230.00316.80
8.0.110.0200.00616.80
8.0.100.0260.00016.80
8.0.90.0210.01016.80
8.0.80.0220.00516.80
8.0.70.0200.00716.80
8.0.60.0230.00416.80
8.0.50.0220.00716.80
8.0.30.0160.01016.80
8.0.20.0210.00616.80
8.0.10.0240.00016.80

preferences:
26.61 ms | 403 KiB | 5 Q