3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Symfony\Component\EventDispatcher { interface EventSubscriberInterface { public static function getSubscribedEvents(); } } namespace App\EventListener { class MyListener implements \Symfony\Component\EventDispatcher\EventSubscriberInterface { public static function getSubscribedEvents(): array { return [ 'kernel.request' => 'onKernelRequest', ]; } public function onKernelRequest(): void { // do something } } } namespace App { var_dump(EventListener\MyListener::getSubscribedEvents()); }

preferences:
47.26 ms | 402 KiB | 5 Q