Arquivos
hhvm/hphp/test/quick/ns_existing_names.php
T
Paul Tarjan 2494ce49b5 Don't allow use Foo where Foo is already a class
Classes need to take up space in the alias map (according to zend).

Suprisingly, functions and constants don't. When importing a duplicate, zend doesn't do anything and just continues, and we currently overwrite the symbol. Should I match zend on this, or is the fact that we both continue working good enough?
2013-05-20 13:52:24 -07:00

15 linhas
173 B
PHP

<?php
namespace A;
const CO = "a";
function f() { return "a"; }
namespace B;
const CO = "b";
function f() { return "b"; }
use A\f;
use A\CO;
var_dump(f());
var_dump(CO);