|
|
Log in / Subscribe / Register

PHP struggles with attributes syntax

PHP struggles with attributes syntax

Posted Aug 8, 2020 5:38 UTC (Sat) by iteratedlateralus (guest, #102183)
Parent article: PHP struggles with attributes syntax

The current pattern for adding meta data to PHP code is to essentially use the popular docblocks...
i.e.:
/**
* @param $foo
* @return App\Bar
*/
public function baz($foo) : App\Bar
{
...
}

It's essentially doxygen, but the community very rarely deviates from the use of the '@' prefixed items within the comment. As a PHP dev, I'd like something that sort of meets in the middle. I think what PHP is doing is sort of "erasing" the bad taste that lots of people had when they saw how inefficient it was... Whatever they choose, I just hope it's not too much to invalidate the millions of doc blocks that already exist.


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds