File manager - Edit - /opt/alt/tests/alt-php80-pecl-yaf_3.3.6-1.el8/tests/issue468.phpt
Back
--TEST-- ISSUE #468 Check for same name variables assignment --SKIPIF-- <?php if (!extension_loaded("yaf")) print "skip"; ?> --INI-- yaf.use_spl_autoload=0 yaf.use_namespace=0 --FILE-- <?php require "build.inc"; startup(); $config = array( "application" => array( "directory" => APPLICATION_PATH, "dispatcher" => array ( "catchException" => true, ), ), ); file_put_contents(APPLICATION_PATH . "/controllers/Index.php", <<<PHP <?php class IndexController extends Yaf_Controller_Abstract { protected function init() { \$this->getView()->assign("ref", "first-source"); } public function indexAction() { \$this->getView()->assign("ref", "second-source"); \$this->getView()->display("index/index.phtml", ["ref" => "thrid-source"]); var_dump(\$this->getViewpath()); return false; } } PHP ); file_put_contents(APPLICATION_PATH . "/views/index/index.phtml", "<?php var_dump(\$ref); ?>"); $app = new Yaf_Application($config); $app->run(); ?> --CLEAN-- <?php require "build.inc"; shutdown(); ?> --EXPECTF-- string(12) "thrid-source" string(%d) "%sapplication%cviews"
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0.22 |
proxy
|
phpinfo
|
Settings