mirror of
https://github.com/php/php-src.git
synced 2025-01-05 18:33:56 +08:00
ded3d984c6
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
32 lines
494 B
PHP
32 lines
494 B
PHP
--TEST--
|
|
ZE2 A redeclared method must have the same or higher visibility
|
|
--FILE--
|
|
<?php
|
|
|
|
class father {
|
|
function f0() {}
|
|
function f1() {}
|
|
public function f2() {}
|
|
protected function f3() {}
|
|
private function f4() {}
|
|
}
|
|
|
|
class same extends father {
|
|
|
|
// overload fn with same visibility
|
|
function f0() {}
|
|
public function f1() {}
|
|
public function f2() {}
|
|
protected function f3() {}
|
|
private function f4() {}
|
|
}
|
|
|
|
class fail extends same {
|
|
function f3() {}
|
|
}
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECT--
|
|
Done
|