1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 01:32:22 +01:00
Files
archived-php-src/Zend/tests/use_function/ignore_constants.phpt
Igor Wiedler e1125a6a89 Correctly distinguish between functions and constants
So far 'use function' applied to both constants and functions. This
patch correctly separates the two.
2013-08-22 15:51:26 +02:00

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