3v4l.org

run code in 300+ PHP versions simultaneously
<?php class T { } class Y { } $x = function(T ...$configs) { var_dump($configs); }; $x(new T, new T, new Y);
Output for 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Fatal error: Uncaught TypeError: {closure:/in/cFFGX:11}(): Argument #3 must be of type T, Y given, called in /in/cFFGX on line 16 and defined in /in/cFFGX:11 Stack trace: #0 /in/cFFGX(16): {closure:/in/cFFGX:11}(Object(T), Object(T), Object(Y)) #1 {main} thrown in /in/cFFGX on line 11
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30
Fatal error: Uncaught TypeError: {closure}(): Argument #3 must be of type T, Y given, called in /in/cFFGX on line 16 and defined in /in/cFFGX:11 Stack trace: #0 /in/cFFGX(16): {closure}(Object(T), Object(T), Object(Y)) #1 {main} thrown in /in/cFFGX on line 11
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught TypeError: Argument 3 passed to {closure}() must be an instance of T, instance of Y given, called in /in/cFFGX on line 16 and defined in /in/cFFGX:11 Stack trace: #0 /in/cFFGX(16): {closure}(Object(T), Object(T), Object(Y)) #1 {main} thrown in /in/cFFGX on line 11
Process exited with code 255.

preferences:
80.71 ms | 1508 KiB | 4 Q