mirror of
https://github.com/php/php-src.git
synced 2024-12-25 01:40:50 +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
|