4 ms·
> Something a fair amount of projects require you to turn off. You know what else throws an E_NOTICE? That is true only for low quality legacy code. I have alw
by codedokode 10y ago
> Something a fair amount of projects require you to turn off. You know what else throws an E_NOTICE?
That is true only for low quality legacy code. I have always developed with all kinds of errors enabled and converted to exceptions (that means single E_NOTICE terminates the program with exception as it is done in Java).
Modern frameworks like Symfony 3 or Slim use the same approach. If you write a project using Symfony you won't miss a notice.
I think default PHP error handling system is wrong - there should be no warnings or notices, only exceptions. Sadly OOP was not very popular among PHP devs in the beginning.
- arenaninja 10y agoIIRC PHP3 didn't even have objects PHP4 introduced objects and is the language people shit on when they say PHP doesn't have real OOP PHP5 introduced Java-like objects PHP5.3 introduced namespaces