📁 File Manager Pro
v10.0.3 | PHP: 8.2.31
Server: LiteSpeed
2026-07-02 16:54:10
📂
/ (Root)
/
opt
/
alt
/
tests
/
alt-php83-pecl-yaf_3.3.6-1.el8
/
tests
📍 /opt/alt/tests/alt-php83-pecl-yaf_3.3.6-1.el8/tests
🔄 Refresh
✏️
Editing: 065.phpt
Read Only
--TEST-- Yaf_Route_Regex map is optional --SKIPIF-- <?php if (!extension_loaded("yaf")) print "skip"; ?> --INI-- yaf.use_namespace=0 --FILE-- <?php $request = new Yaf_Request_Http("/subdir/ap/1.2/name/value", "/subdir"); $router = new Yaf_Router(); $router->addConfig( array( array( "type" => "regex", "match" => "#^/ap/([^/]*)/*#i", "route" => array( array( "action" => 'ap', ), ), ) ) )->route($request); var_dump($router->getCurrentRoute()); var_dump($request->getActionName()); $router->addRoute("regex", new Yaf_Route_Regex("#^/ap/([^/]*)/*#i", array("action" => "ap")))->route($request); var_dump($router->getCurrentRoute()); var_dump($request->getActionName()); ?> --EXPECT-- int(0) NULL string(5) "regex" string(2) "ap"
💾 Save Changes
❌ Cancel