php-src/Zend/tests/objects_007.phpt

23 lines
428 B
PHP

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