1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/Zend/tests/objects/objects_005.phpt
Tim Düsterhus 7c9c39584c zend_inheritance: Improve formatting of return-by-ref & in zend_get_function_declaration() (#20104)
The space after `&` made it look like the `&` was not part of the signature,
possibly leading to confusion why the two signatures are incompatible without
carefully reading the message.
2025-10-19 17:37:38 +02:00

23 lines
359 B
PHP

--TEST--
method overloading with different method signature
--INI--
error_reporting=8191
--FILE--
<?php
class test {
function &foo() {}
}
class test2 extends test {
function &foo() {}
}
class test3 extends test {
function foo() {}
}
?>
--EXPECTF--
Fatal error: Declaration of test3::foo() must be compatible with &test::foo() in %s on line %d