xref: /PHP-5.6/Zend/tests/inter_01.phpt (revision 7914d298)
1--TEST--
2Inherited constant from interface
3--FILE--
4<?php
5interface foo {
6    const foo = 'foobar';
7    public function bar($x = foo);
8}
9
10class foobar implements foo {
11    const foo = 'bar';
12    public function bar($x = foo::foo) {
13        var_dump($x);
14    }
15}
16?>
17--EXPECTF--
18Fatal error: Cannot inherit previously-inherited or override constant foo from interface foo in %s on line %d
19