3v4l.org

run code in 300+ PHP versions simultaneously
<?php const SomeInterface = 1; const AnotherInterface = 2; $object = AnotherInterface; var_dump( match ($object) { SomeInterface => 'foo', AnotherInterface => 'bar', } );

preferences:
52.67 ms | 402 KiB | 5 Q