RE: [PHP] Question regarding :: syntax

From: Date: Mon, 03 Jun 2002 17:42:26 +0000
Subject: RE: [PHP] Question regarding :: syntax
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-100441@lists.php.net to get a copy of this message
This may be a dumb question but, how can you be sure that the $this-> is referring to the parent classes' property and not the current class. On that note, does it really matter of which one it refers? -Jared -----Original Message----- From: Tobyn Baugher [mailto:toby@rsux.com] Sent: Monday, June 03, 2002 12:58 PM To: php list Subject: RE: [PHP] Question regarding :: syntax On Mon, 2002-06-03 at 12:45, Jared Boelens wrote: > So am i to understand that i will have to do it in this manner? *SNIP* No no no... B extends A, and you have an instance of B. Just do this: class A { var $b; *snip* } class B { function B($b) { $this->b = $b; } } That will work fine. Regards, Toby -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#100441) next »