3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $matches = array(); // $controller = $this->getRequest()->attributes->get('_controller'); $controller = "Acme\MyBundle\Controller\MyController::myAction"; preg_match('/(.*)\\\Bundle\\\(.*)\\\Controller\\\(.*)Controller::(.*)Action/', $matches, $controller); print_r($matches);
Output for 4.3.3 - 7.1.0
Warning: preg_match() expects parameter 2 to be string, array given in /in/m8YVM on line 6 Array ( )
Output for 4.3.0 - 4.3.2
Notice: Array to string conversion in /in/m8YVM on line 6 Array ( )