If I have code like this:
class Person {
$age;
$height;
$more_stuff_about_the_person;
function about() {
return /* Can I get the per
This example might be helpful currently there is no method that tells you the object name you have to specify yourself like in the code below:
class Person {
public $age=0;
public $height=0;
public $objPerson='';
function about($objPerson,$age,$height) {
return
'Person Object Name: '.$objPerson.'
'.
'Age: '.$age.'
'.
'height: '.$height.'ft
';
}
}
$John = new Person();
$Peter = new Person();
print $John->about('John',25,'5.5');
print $Peter->about('Peter',34,'6.0');