3v4l.org

run code in 500+ PHP versions simultaneously
<?php class x { function foo(int $a, int ...$args) {} } class y extends x { function foo( int ...$args) {} } // OK! //class z extends x { function foo(int $a, int $b, int ...$args) {} } // KO class x2 { function foo() {} } class y2 extends x2 { function foo(mixed ...$args) {} } // OK! //class y22 extends x2 { function foo(mixed $a, mixed ...$args) {} } // KO class x4 { function foo($a, $b) {} } class y4 extends x4 { function foo($b, $c, $d) {} } // OK! //class y22 extends x2 { function foo(mixed $a, mixed ...$args) {} } // KO class x3 { function foo(mixed ...$args) {} } //class y3 extends x3 { function foo() {} } // KO //class y32 extends x3 { function foo(mixed $a) {} } // KOx class x4 { function foo(int $a, int $b) {} } class y4 extends x4 { function foo(int $b, int $a) {} } // KO

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.180.0120.01019.67
8.3.50.0140.00516.68

preferences:
35.2 ms | 493 KiB | 4 Q