1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 03:32:20 +02:00
Files
archived-php-src/tests/classes/interface_constant_inheritance_002.phpt
2008-03-06 10:56:07 +00:00

17 lines
297 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 constant FOO from interface I in %s on line 6