3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php define( 'ROUTES', array( array('httpMethod' => 'GET', 'url' => '[:music_category]/xml', 'controller' => 'CategoryController', 'action' => 'xml'), array('httpMethod' => 'GET', 'url' => '[:music_category]/json', 'controller' => 'CategoryController', 'action' => 'json'), array('httpMethod' => 'GET|POST', 'url' => 'xml', 'controller' => 'temp_controller', 'action' => 'xml'); array('httpMethod' => 'GET|POST', 'url' => 'json', 'controller' => 'temp_controller', 'action' => 'json'); array('httpMethod' => 'GET|POST', 'url' => 'post/[:music_category]/{:data}/xml', 'controller' => 'CategoryController', 'action' => 'post'); ); ); foreach (ROUTES as $route) { $routeObj = new Route($route['httpMethod'], $route['url'], $route['controller'], $route['action']); print_f($routeObj->getMethodList()); print_f($routeObj->getUrl()); print_f($routeObj->getUrlTokenList()); print_f($routeObj->getController()); print_f($routeObj->getAction()); print_f($routeObj->getTokenParameterList()); print_f($routeObj->getResourceList()); print_f($routeObj->getResourceDetailList()); }
based on s9SK7
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.4.34
Parse error: syntax error, unexpected ';', expecting ')' in /in/OjmM1 on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected ';', expecting ')' in /in/OjmM1 on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/OjmM1 on line 10
Process exited with code 255.