diff options
Diffstat (limited to 'Zend/tests/inter_01.phpt')
-rw-r--r-- | Zend/tests/inter_01.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Zend/tests/inter_01.phpt b/Zend/tests/inter_01.phpt new file mode 100644 index 000000000..db2e86d20 --- /dev/null +++ b/Zend/tests/inter_01.phpt @@ -0,0 +1,18 @@ +--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 |