3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CacheabilityMetadata {} class_alias('CacheabilityMetadata', 'CacheableMetadata'); class SomethingElse {} function f(CacheabilityMetadata $m) {} function g(CacheableMetadata $m) {} f(new CacheabilityMetadata); f(new CacheableMetadata); g(new CacheabilityMetadata); g(new CacheableMetadata); f(new SomethingElse);
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Fatal error: Uncaught TypeError: f(): Argument #1 ($m) must be of type CacheabilityMetadata, SomethingElse given, called in /in/80D6A on line 14 and defined in /in/80D6A:7 Stack trace: #0 /in/80D6A(14): f(Object(SomethingElse)) #1 {main} thrown in /in/80D6A on line 7
Process exited with code 255.

preferences:
70.25 ms | 402 KiB | 91 Q