DEV Community

Discussion on: Don't return associative arrays!

 
aleksikauppila profile image
Aleksi Kauppila

Regarding method signatures i think PHP is doing a good job. AFAIK you can pass a null to method in Java instead of an object. That is very weird and stupid imo. PHP throws a TypeError if the type doesn't match.