mirror of
https://github.com/php/php-src.git
synced 2024-09-27 12:57:26 +00:00
18 lines
298 B
PHP
18 lines
298 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
|