mirror of
https://github.com/php/php-src.git
synced 2024-12-18 06:21:41 +08:00
7aacc705d0
Closes GH-5958
45 lines
671 B
PHP
45 lines
671 B
PHP
--TEST--
|
|
Bug #72496 (declare public method with signature incompatible with parent private method should not throw a warning)
|
|
--FILE--
|
|
<?php
|
|
class Foo
|
|
{
|
|
private function getFoo()
|
|
{
|
|
return 'Foo';
|
|
}
|
|
|
|
private function getBar()
|
|
{
|
|
return 'Bar';
|
|
}
|
|
|
|
private function getBaz()
|
|
{
|
|
return 'Baz';
|
|
}
|
|
}
|
|
|
|
class Bar extends Foo
|
|
{
|
|
public function getFoo($extraArgument)
|
|
{
|
|
return $extraArgument;
|
|
}
|
|
|
|
protected function getBar($extraArgument)
|
|
{
|
|
return $extraArgument;
|
|
}
|
|
|
|
private function getBaz($extraArgument)
|
|
{
|
|
return $extraArgument;
|
|
}
|
|
}
|
|
|
|
echo "OK\n";
|
|
?>
|
|
--EXPECT--
|
|
OK
|