mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
a5360e80c2
RFC: https://wiki.php.net/rfc/final_class_const Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
21 lines
331 B
PHP
21 lines
331 B
PHP
--TEST--
|
|
errmsg: cannot inherit previously inherited constant
|
|
--FILE--
|
|
<?php
|
|
|
|
interface test1 {
|
|
const FOO = 10;
|
|
}
|
|
|
|
interface test2 {
|
|
const FOO = 10;
|
|
}
|
|
|
|
class test implements test1, test2 {
|
|
}
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Class test inherits both test1::FOO and test2::FOO, which is ambiguous in %s on line %d
|