So in this answer to the question: Hidden Features of PHP?
Talks about using standard classes in PHP. Which in his own example looks sweet but I cant get it to work, se here.
The code is:
<?php
$person = new stdClass();
$person->name = 'bob';
$person->age = 5;
$string = "$person->name is $person->age years old.";
?>
I realize I may be completely misinterpreting the answer but anyway, this is what I understood :)
The this I don't understand is (the most important probably) stdClass(); I read: What is stdClass in PHP? but I think I'm even more confused now. (I did't find the accepted answer very useful to be honest)
Thanks in advance!!
EDIT:
Damn!! I'm sorry guys!! I was not code related!! when I copy the code to ideone.com I just copies some other values with it and prevents it from working (or at least this is my best guess) works just fine in codepad.org, I'm switching!!