mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
e1125a6a89
So far 'use function' applied to both constants and functions. This patch correctly separates the two.
24 lines
253 B
PHP
24 lines
253 B
PHP
--TEST--
|
|
use function should ignore namespaced constants
|
|
--FILE--
|
|
<?php
|
|
|
|
namespace foo {
|
|
const bar = 42;
|
|
}
|
|
|
|
namespace {
|
|
const bar = 43;
|
|
}
|
|
|
|
namespace {
|
|
use function foo\bar;
|
|
var_dump(bar);
|
|
echo "Done\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(43)
|
|
Done
|