php-src/Zend/tests/ns_035.phpt

27 lines
466 B
Plaintext
Raw Normal View History

--TEST--
035: Name ambiguity in compile-time constant reference (php name)
2007-08-25 16:02:11 +00:00
--SKIPIF--
<?php if (!extension_loaded("spl")) die("skip SPL is no available"); ?>
--FILE--
<?php
namespace A;
2008-12-04 20:12:30 +00:00
use \ArrayObject;
function f1($x = ArrayObject::STD_PROP_LIST) {
var_dump($x);
}
2008-12-04 20:12:30 +00:00
function f2($x = \ArrayObject::STD_PROP_LIST) {
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)