3v4l.org

run code in 300+ PHP versions simultaneously
<?php $matches = array(); // $controller = $this->getRequest()->attributes->get('_controller'); $controller = "Acme\MyBundle\Controller\MyController::myAction"; preg_match_all('/(.*)\\Bundle\\(.*)\\Controller\\(.*)Controller::(.*)Action/', $controller, $matches); print_r($matches);

preferences:
35.4 ms | 402 KiB | 5 Q