mirror of
https://github.com/php/php-src.git
synced 2024-12-20 07:20:33 +08:00
19 lines
380 B
Plaintext
19 lines
380 B
Plaintext
|
--TEST--
|
||
|
Inherited constant from interface
|
||
|
--FILE--
|
||
|
<?php
|
||
|
interface foo {
|
||
|
const foo = 'foobar';
|
||
|
public function bar($x = foo);
|
||
|
}
|
||
|
|
||
|
class foobar implements foo {
|
||
|
const foo = 'bar';
|
||
|
public function bar($x = foo::foo) {
|
||
|
var_dump($x);
|
||
|
}
|
||
|
}
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
Fatal error: Cannot inherit previously-inherited constant foo from interface foo in %s on line %d
|