Hello,
if i have the folowing class:
class person {
var $name;
var $surname;
var $flag;
function person($name=NU LL,$surname=NUL L) {
$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::display Person($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
if i have the folowing class:
class person {
var $name;
var $surname;
var $flag;
function person($name=NU LL,$surname=NUL L) {
$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::display Person($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
Comment