This is attributes. I saw proposal for attributes that was declined. I think that the language should contain attributes, but because the lack of them the Annotations, which's currently used by some FW can be a great addition.
To tell the troth, even if attributes was implemented in PHP, since the doc-comment is being used in applications, I think that adding annotations to the Reflection class can be great anyway. It can be handy in case there's attributes, for example, to create documentation of functions etc. On Mon, Jan 7, 2013 at 2:16 AM, Clint Priest <cpri...@zerocue.com> wrote: > Just a thought on this, some other languages support attributes which is > similar but could also allow the engine to use them for things. As a quick > example (roughly based on what I've seen in c#) but applied to PHP use case: > > class a { > [$date(Nullable)] > public function foo(DateTime $date) { ... } > } > > -Clint > > On Jan 6, 2013, at 3:58 PM, Yahav Gindi Bar <g.b.ya...@gmail.com> wrote: > > > Hi internals! > > > > In one of the discussions (about the "deprecated" keyword, to be > specific), > > it was been said that adding ability to read doc-comment annotation could > > be handy. Personally, I really think it can be great. > > > > So, I've created an RFC that propose to improve the Reflection extension > by > > adding the ability to read annotations decorated in the doc-comment. > > > > https://wiki.php.net/rfc/reflection_doccomment_annotations > > > > What is your opinion about this? > > > > Regards, > > Yahav. >