How is annotation useful in PHP? and I don\'t mean PHPDoc generically.
I just want a real-world example or something, I guess.
So, according to @Max\'s
Exactly what is it good for?
Annotations basically let you inject behavior and can promote decoupling. One example would be the Doctrine ORM. Because of the use of annotations you do not have to inherit from a Doctrine-specific class unlike the Propel ORM.
Hard to debug lazy loading dynamic coding?
Unfortunately that is a side effect like most/all actions of decoupling such as design patterns, data translations, etc.
Hmm. My brain still isn't groking it. – hopeseekr
If you didn't inherit from a Doctrine class, you'd most likely have to use some other metadata specification, like a configuration file, to specify that a particular property is the ID of the record. In that case, it would be too far removed from the syntax that the annotation (metadata) describes.