#10ThingsILikeRightNow
<?php
function iLike($programming): string
{
return str_repeat($programming, 10);
}
@array
Huh, I didn't know you could set a return type for functions in PHP. Well, I just learned something new! XD

@benjaminhollon BTW, another advantage of explicit types is that you can document them in your PHPDoc blocks (actually, if you use an IDE it typically will do this for you ;) ). If you write an API and need to generate documentation for it, this can be pretty convenient. :)

Another question is that this and plenty other improvements have been gradually added to PHP, and lots of people who haven't used it in a while still don't know, so they have a distorted image at times. :P

@array
"PHPDoc", you say? I *definitely* know what that is. XD

(I think when I last used PHP I was using version 5.something; PHP 7 was out but I don't think my host had it)

@benjaminhollon You surely know what is that because you've seen similar documentation blocks elsewhere: https://en.m.wikipedia.org/wiki/PHPDoc ;) For PHP you have this handy tool, too, for automated docs generation: https://phpdoc.org/ Just be careful if you use it in, say, the root of a Laravel project... I did, and it documented all the vendor classes and stuff, resulting in... Some gigabites of documentation! XD
PHPDoc - Wikipedia

@array
Oh, interestin!
@array
I've never actually used any of those automatic docs generators.
@benjaminhollon It's very cool, and if you work in a project with more people probably a must have. Even if you do it all alone, if the project gets big enough it can be pretty helpful. ;)
@array
I can see that. As a (hopefully) professional writer, though, it feels tough to trust code to get the documentation right, even if it is based on things I inputted. :)
@benjaminhollon I've just used Phpdocumentor, and I think it went pretty good... Except for the detail I said before, running it in a Laravel's project root, but that was only me to blame. XD