Posted by Aggelos on 12/20/06 16:25
Hello,
if i have the folowing class:
class person {
var $name;
var $surname;
var $flag;
function person($name=NULL,$surname=NULL) {
$this->name = $name;
$this->surname = $surname;
$this->flag = 1;
}
function displayPerson($person) {
print_r($person);
}
}
I can do the folowing without instantiating the class :
$person = new person('Fred','Jones');
person::displayPerson($person);
is there anyway to access the $flag variable in the contructor without
having to do $person = new person() ?
Something like echo person::$flag; ? <------- I know that this is not
right. I am just asking if there is something simmilar tha I can do.
Thank you,
Angelos.
Is there anyway
[Back to original message]
|