cvs: php-src /tests/lang 036.phpt 037.phpt

From: Date: Mon, 21 Jul 2003 11:48:37 +0000
Subject: cvs: php-src /tests/lang 036.phpt 037.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-22681@lists.php.net to get a copy of this message
zeev Mon Jul 21 07:48:37 2003 EDT Added files: /php-src/tests/lang 036.phpt 037.phpt Log: Add a couple of tests Index: php-src/tests/lang/036.phpt +++ php-src/tests/lang/036.phpt --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 Index: php-src/tests/lang/037.phpt +++ php-src/tests/lang/037.phpt --TEST-- 'Static' binding for private variables --FILE-- <?php class par { private $id="foo"; function displayMe() { $this->displayChild(); } }; class chld extends par { private $id = "bar"; function displayChild() { print $this->id; } }; $obj = new chld(); $obj->displayMe(); ?> --EXPECT-- bar

« previous php.cvs (#22681) next »