mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
a5360e80c2
RFC: https://wiki.php.net/rfc/final_class_const Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
29 lines
364 B
PHP
29 lines
364 B
PHP
--TEST--
|
|
Bug #49472 (Constants defined in Interfaces can be overridden)
|
|
--FILE--
|
|
<?php
|
|
|
|
interface ia {
|
|
const c = 'Sea';
|
|
const y = 2;
|
|
}
|
|
|
|
class Foo implements ia {
|
|
}
|
|
|
|
class FooBar extends Foo implements ia {
|
|
const x = 1;
|
|
const c = 'Ocean';
|
|
|
|
public function show() {
|
|
return ia::c;
|
|
}
|
|
}
|
|
|
|
new FooBar;
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===DONE===
|