xref: /PHP-8.2/Zend/tests/objects_008.phpt (revision 315f4094)
1--TEST--
2method overloading with different method signature
3--FILE--
4<?php
5
6class test {
7    function foo(Test $arg) {}
8}
9
10class test2 extends test {
11    function foo(Test $arg) {}
12}
13
14class test3 extends test {
15    function foo(Test3 $arg) {}
16}
17
18?>
19--EXPECTF--
20Fatal error: Declaration of test3::foo(Test3 $arg) must be compatible with test::foo(Test $arg) in %s on line %d
21