5

PHP is awesome, but it annoys me that there is no typing and that you still can get errors based on types...
Other than that, not being able to catch all errors in one catch and especially not being able to natively catch fatal errors is my biggest problem...

(not natively meaning that you can use hackish solutions but there's no "fatal error" class to use in your try catch, and you're using the register shutdown function not as intended...)

Comments
  • 0
    @DLMousey my biggest problem isn't just the return type, it's mostly the input type and the type of a certain variable That cannot be enforced
  • 0
    @DLMousey you can hint but you can't enforce it... That's my pet peeve :p
  • 0
    PHP 7 gives you data types I think
  • 0
    @linuxxx only return types unfortunately
  • 0
    @FMashiro Hmm, not only return types but I wasn't right either. Return types and parameters as well ( function nope(string $nope)) < possible as well appearantly
  • 0
    @linuxxx ooooh I guess I'll have to contact my host to upgrade then!
    Thanjs for pointing it out, I'll look into it
  • 1
    @FMashiro First verify it online yourself because I can't say for sure if my sources are right but I think so 😊
  • 1
    The only thing I'm really missing in PHP is method/constructor overloading like c# or Java style
Add Comment