summaryrefslogtreecommitdiff
path: root/tests/classes/interface_constant_inheritance_002.phpt
blob: 681de11cbfbc830339518271a8f6ee7e5a21bd21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
Ensure a class may not shadow a constant inherited from an interface.
--FILE--
<?php
interface I {
	const FOO = 10;
}

class C implements I {
	const FOO = 10;
}

echo "Done\n";
?>
--EXPECTF--
Fatal error: Cannot inherit previously-inherited or override constant FOO from interface I in %s on line 6