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.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.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.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:
32.91 ms | 403 KiB | 5 Q