php-src/Zend/tests/inter_01.phpt

19 lines
387 B
Plaintext
Raw Normal View History

2007-12-13 21:51:02 +08:00
--TEST--
2018-10-15 00:03:31 +08:00
Inherited constant from interface
2007-12-13 21:51:02 +08:00
--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);
2018-09-17 01:16:42 +08:00
}
2007-12-13 21:51:02 +08:00
}
?>
--EXPECTF--
Fatal error: Cannot inherit previously-inherited or override constant foo from interface foo in %s on line %d