3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A {} class B {} class C { public function __construct( protected 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.0130.00316.60
8.3.120.0060.00318.79
8.3.110.0060.00316.78
8.3.100.0030.00618.75
8.3.90.0160.00326.77
8.3.80.0070.00318.55
8.3.70.0150.00418.43
8.3.60.0120.00318.43
8.3.50.0120.00318.54
8.3.40.0100.00321.95
8.3.30.0090.00619.19
8.3.20.0060.00324.18
8.3.10.0000.00824.66
8.3.00.0060.00326.16
8.2.250.0050.00316.81
8.2.240.0160.00317.22
8.2.230.0150.00320.94
8.2.220.0030.00537.54
8.2.210.0040.00426.77
8.2.200.0090.00018.41
8.2.190.0090.00918.35
8.2.180.0090.00917.00
8.2.170.0140.00718.66
8.2.160.0100.00722.96
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0000.00722.16
8.2.110.0090.00022.29
8.2.100.0040.00817.78
8.2.90.0230.01117.73
8.2.80.0230.00617.00
8.2.70.0190.01117.13
8.2.60.0220.00817.13
8.2.50.0260.00417.13
8.2.40.0270.00017.38
8.2.30.0250.00317.50
8.2.20.0230.00717.00
8.2.10.0170.00917.50
8.2.00.0180.00917.25
8.1.300.0090.00616.15
8.1.290.0030.00618.88
8.1.280.0200.00025.92
8.1.270.0040.00424.66
8.1.260.0050.00326.35
8.1.250.0030.00528.09
8.1.240.0030.00722.14
8.1.230.0070.00420.92
8.1.220.0240.00317.13
8.1.210.0180.00916.99
8.1.200.0340.00317.13
8.1.190.0210.00716.86
8.1.180.0260.00417.00
8.1.170.0250.00317.25
8.1.160.0170.01016.88
8.1.150.0170.01017.13
8.1.140.0190.00917.25
8.1.130.0220.00317.00
8.1.120.0260.00317.13
8.1.110.0240.00317.13
8.1.100.0360.00417.11
8.1.90.0200.00717.23
8.1.80.0230.00517.13
8.1.70.0190.00817.00
8.1.60.0180.00717.25
8.1.50.0260.00017.11
8.1.40.0220.00517.25
8.1.30.0240.00317.48
8.1.20.0150.01217.35
8.1.10.0230.00417.38
8.1.00.0220.00517.13
8.0.300.0250.00316.80
8.0.290.0280.00016.80
8.0.280.0230.00416.80
8.0.270.0240.00416.80
8.0.260.0140.01316.80
8.0.250.0180.00916.80
8.0.240.0230.00616.80
8.0.230.0230.00316.80
8.0.220.0260.00316.80
8.0.210.0200.00816.80
8.0.200.0280.00916.80
8.0.190.0210.00916.80
8.0.180.0280.00316.80
8.0.170.0190.00816.80
8.0.160.0260.00016.80
8.0.150.0250.00316.80
8.0.140.0200.00816.80
8.0.130.0210.00616.80
8.0.120.0220.00316.80
8.0.110.0260.00016.80
8.0.100.0240.00416.80
8.0.90.0290.00016.80
8.0.80.0240.00416.80
8.0.70.0230.00416.80
8.0.60.0240.00416.80
8.0.50.0270.00316.80
8.0.30.0200.00816.80
8.0.20.0210.00716.80
8.0.10.0250.00316.80

preferences:
37.6 ms | 403 KiB | 5 Q