3v4l.org

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

preferences:
44.23 ms | 1236 KiB | 5 Q