3v4l.org

run code in 300+ PHP versions simultaneously
<?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()); }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.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.3.11, 4.4.0 - 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.

preferences:
204.77 ms | 1395 KiB | 124 Q