php-src/Zend/tests/use_const/shadow_global.phpt
Peter Kokot f6605c788f Rename *.php files in Zend/tests to *.inc
*.php files are ignored by Git and a better practice might be to rename
PHP included files for tests.
2018-09-23 17:20:42 +02:00

26 lines
339 B
PHP

--TEST--
shadowing a global constant with a local version
--FILE--
<?php
namespace {
require 'includes/global_bar.inc';
require 'includes/foo_bar.inc';
}
namespace {
var_dump(bar);
}
namespace {
use const foo\bar;
var_dump(bar);
echo "Done\n";
}
?>
--EXPECT--
string(10) "global bar"
string(9) "local bar"
Done