3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); trait Foo { public function bar(): int { return 1; } } class Bar { use Foo; } class Baz { use Foo; public function bar(): string { return 'boo'; } } $bar = new Bar(); var_dump($bar->bar()); $baz = new Baz(); var_dump($baz->bar());

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.00920.41
8.4.110.0150.00618.79
8.4.100.0120.00817.64
8.4.90.0130.00817.78
8.4.80.0250.01618.65
8.4.70.0450.00817.53
8.4.60.0370.00917.67
8.4.50.0150.00717.33
8.4.40.0470.00517.06
8.4.30.0430.00817.24
8.4.20.0450.00717.19
8.4.10.0430.00617.54
8.3.250.0070.01117.30
8.3.240.0060.00316.75
8.3.230.0090.01016.64
8.3.220.0270.00818.93
8.3.210.0190.00416.88
8.3.200.0370.00916.88
8.3.190.0410.00616.88
8.3.180.0420.00716.88
8.3.170.0270.00716.88
8.3.160.0430.00316.88
8.3.150.0170.00616.88
8.3.140.0240.00316.88
8.3.130.0350.00916.88
8.3.120.0370.00816.88
8.3.110.0350.00716.88
8.3.100.0430.00716.88
8.3.90.0370.01316.88
8.3.80.0380.00816.88
8.3.70.0400.00716.88
8.3.60.0310.00916.88
8.3.50.0300.00416.88
8.3.40.0380.01017.33
8.3.30.0340.00517.38
8.3.20.0350.00917.36
8.3.10.0270.01317.09
8.3.00.0110.01217.34
8.2.290.0100.00918.88
8.2.280.0350.00416.88
8.2.270.0300.01016.88
8.2.260.0280.01116.88
8.2.250.0330.01016.88
8.2.240.0290.01316.88
8.2.230.0340.00916.88
8.2.220.0310.01016.88
8.2.210.0290.01316.88
8.2.200.0310.01016.88
8.2.190.0360.00716.88
8.2.180.0310.01116.88
8.2.170.0360.00617.91
8.2.160.0320.01017.61
8.2.150.0340.01017.62
8.2.140.0270.00117.58
8.2.130.0360.01117.33
8.2.120.0390.00517.57
8.2.110.0260.00517.39
8.2.100.0340.01017.28
8.2.90.0340.01017.49
8.2.80.0390.00317.48
8.2.70.0390.00417.41
8.2.60.0350.00717.36
8.2.50.0400.00917.28
8.2.40.0260.00517.48
8.2.30.0250.00417.28
8.2.20.0340.00317.50
8.2.10.0170.01017.32
8.2.00.0300.00717.43

preferences:
31.9 ms | 403 KiB | 5 Q