3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** vendor/symfony/abc */ namespace Foobar { /* private */ class Wizzbang { } } /** src/Wizzbonk.php */ namespace App { class ExternalClass { public function doStuff(): \Foobar\Wizzbang { return \Foobar\fetchPrivateWizzbang(); } public function accessOtherFizz(): \Foobar\Wizzbang { return new \Foobar\OtherFizz(); } } } namespace Foobar { function fetchPrivateWizzbang() { return new Wizzbang(); } /* private */ class OtherFizz extends Wizzbang { } } namespace { $x = new \App\ExternalClass(); var_dump($x->doStuff()); var_dump($x->accessOtherFizz()); }

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.130.0080.00417.79
8.4.120.0140.00620.67
8.4.110.0120.00818.84
8.4.100.0050.00417.65
8.4.90.0130.00720.64
8.4.80.0120.00724.16
8.4.70.0150.01020.77
8.4.60.0090.00720.70
8.4.50.0300.00617.52
8.4.40.0250.01117.33
8.4.30.0230.00518.89
8.4.20.0190.00217.53
8.4.10.0160.00517.29
8.3.260.0130.00716.47
8.3.250.0120.00718.80
8.3.240.0110.00916.58
8.3.230.0140.00616.37
8.3.220.0110.00618.77
8.3.210.0130.00816.57
8.3.200.0120.00816.63
8.3.190.0020.00617.21
8.3.180.0140.00416.50
8.3.170.0170.00316.32
8.3.160.0160.00416.47
8.3.150.0160.00616.61
8.3.140.0200.00216.24
8.3.130.0150.00516.49
8.3.120.0170.00316.29
8.3.110.0130.00516.25
8.3.100.0150.00716.56
8.3.90.0180.00316.16
8.3.80.0140.00516.60
8.3.70.0160.00716.45
8.3.60.0150.00516.49
8.3.50.0170.00516.48
8.3.40.0140.00517.27
8.3.30.0130.00517.22
8.3.20.0170.00217.00
8.3.10.0140.00317.32
8.3.00.0060.00417.11
8.2.290.0120.00817.37
8.2.280.0140.00316.82
8.2.270.0130.00416.24
8.2.260.0140.00416.41
8.2.250.0120.00516.67
8.2.240.0120.00516.63
8.2.230.0150.00216.05
8.2.220.0140.00216.77
8.2.210.0120.00416.09
8.2.200.0130.00416.39
8.2.190.0120.00416.33
8.2.180.0130.00416.40
8.2.170.0160.00217.57
8.2.160.0140.00417.56
8.2.150.0160.00517.34
8.2.140.0120.00519.32
8.2.130.0170.00617.48
8.2.120.0240.00617.59
8.2.110.0200.00717.22
8.2.100.0230.00217.54
8.2.90.0230.00817.56
8.2.80.0160.00417.22
8.2.70.0150.00717.36
8.2.60.0190.00517.07
8.2.50.0180.00417.14
8.2.40.0140.00517.53
8.2.30.0190.00817.50
8.2.20.0140.00517.11
8.2.10.0130.00617.07
8.2.00.0120.00517.12
8.1.320.0130.00516.20

preferences:
27.3 ms | 403 KiB | 5 Q