mirror of
https://github.com/php/php-src.git
synced 2024-12-18 14:30:35 +08:00
f6605c788f
*.php files are ignored by Git and a better practice might be to rename PHP included files for tests.
26 lines
339 B
PHP
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
|