DEV Community

What i like on PHP 7.4

May Meow on October 06, 2020

Ok there is more what i like but this is biggest chages for me. Maybe someone can tell me im crazy but i realy like strongly typed languages. And ...
Collapse
 
catalinionut profile image
Catalin Ionut Titov

Why do you still use doc block if every property including the return type is type hinted? It's redudant.

Collapse
 
maymeow profile image
May Meow • Edited

They are rewritten functions (i used 7.3 before)... but sometimes i have to use them for example if my return type is Array of something.... i cant return function xy() : User[] but only function xy(): array so i add @return array|User[] to docblock...

PS: and PhpStorm returns me errors when definition in docblock is missing... (i have to configure it to do not doing it)