mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

So far 'use function' applied to both constants and functions. This patch correctly separates the two.
23 lines
253 B
PHP
23 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
|