php-src/tests/classes/interface_constant_inheritance_002.phpt
2009-12-04 11:32:39 +00:00

18 lines
310 B
PHP

--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