diff options
Diffstat (limited to 'Zend/tests/bug73987_1.phpt')
-rw-r--r-- | Zend/tests/bug73987_1.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Zend/tests/bug73987_1.phpt b/Zend/tests/bug73987_1.phpt new file mode 100644 index 0000000000..6a0a157f29 --- /dev/null +++ b/Zend/tests/bug73987_1.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #73987 (Method compatibility check looks to original definition and not parent) +--FILE-- +<?php + +interface I { + public function example(); +} +class A implements I { + public function example(): int { } // compatible with I::example +} +class B extends A { + public function example(): string { } // compatible with I::example +} + +?> +--EXPECTF-- +Fatal error: Declaration of B::example(): string must be compatible with A::example(): int in %s |