1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/tests/lang/036.phpt
2020-02-03 22:52:20 +01:00

28 lines
388 B
PHP

--TEST--
Child public element should not override parent private element in parent methods
--FILE--
<?php
class par {
private $id = "foo";
function displayMe()
{
print $this->id;
}
};
class chld extends par {
public $id = "bar";
function displayHim()
{
parent::displayMe();
}
};
$obj = new chld();
$obj->displayHim();
?>
--EXPECT--
foo