#10ThingsILikeRightNow
<?php
function iLike($programming): string
{
return str_repeat($programming, 10);
}
<?php
function iLike($programming): string
{
return str_repeat($programming, 10);
}
@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)