php-src/tests/classes/interface_constant_inheritance_002.phpt

17 lines
308 B
Plaintext
Raw Normal View History

--TEST--
2018-10-14 16:03:31 +00:00
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--
2009-12-04 11:32:39 +00:00
Fatal error: Cannot inherit previously-inherited or override constant FOO from interface I in %s on line 6