php-src/Zend/tests/selfParent_002.phpt
Steph Fox 6d8760677d - killed off UEXPECT
- altered EXPECT for parser errors. This may or may not be a Good Thing.
2008-05-26 14:33:44 +00:00

28 lines
447 B
PHP
Executable File

--TEST--
Test when constants are initialised. See also selfParent_001.phpt.
--FILE--
<?php
class A {
const myConst = "const in A";
const myDynConst = self::myConst;
public static function test() {
var_dump(self::myDynConst);
}
}
class B extends A {
const myConst = "const in B";
public static function test() {
var_dump(parent::myDynConst);
}
}
B::test();
A::test();
?>
--EXPECT--
unicode(10) "const in A"
unicode(10) "const in A"