I used print_r
on some variables of a framework to figure out their contents and what i saw was like this
Array (
[pages:navigation] => Navigation
[pages:via] => via pages
[item:object:page_top] => Top-level pages
)
I thought this was ok because i can create arrays like
$ar=array('pages:navigation' => 'Navigation',
'pages:via' => 'via pages');
and it would be no problem but when i create this
class student {
public $name;
public function get_name() {
return $name;
}
private $id;
public function get_id() {
return $id;
}
protected $email;
}
$s = new student();
$s->name="hi";
print_r($s);
I get this:
student Object ( [name] => hi [id:student:private] => [email:protected] => )
here the symbol :
is automatically inserted for id
indicating that it is a member of student
and is private
but it is not inserted for public
member name
I cant figure out what does the symbol :
actually mean? Is it some kind of namespacing?