php-src/Zend/tests/ns_035.phpt

25 lines
389 B
Plaintext
Raw Normal View History

--TEST--
035: Name ambiguity in compile-time constant reference (php name)
--FILE--
<?php
namespace A;
2008-12-04 20:12:30 +00:00
use \ArrayObject;
function f1($x = ArrayObject::STD_PROP_LIST) {
2020-02-03 21:52:20 +00:00
var_dump($x);
}
2008-12-04 20:12:30 +00:00
function f2($x = \ArrayObject::STD_PROP_LIST) {
2020-02-03 21:52:20 +00:00
var_dump($x);
}
var_dump(ArrayObject::STD_PROP_LIST);
2008-12-04 20:12:30 +00:00
var_dump(\ArrayObject::STD_PROP_LIST);
f1();
f2();
2007-08-25 16:02:11 +00:00
?>
--EXPECT--
int(1)
int(1)
int(1)
int(1)