Earlier quoted context omitted.
Couldn't agree more with E_ALL|E_STRICT. The current legacy system I am maintaining took me 2 weeks to clear up 90% of the NOTICE errors for using undefined variables etc. Dirty code is dirty, and it is because of this that PHP has received so much negative publicity.
The completely brain dead naming conventions for function names (or rather, the lack thereof) is another. PHP has grown organically, just like the web, to fill a very irregular shaped niche and it shows that history in all the gory little details. That said it made me more money than any other programming language combined (including C, but it's a very close second). Probably a lot of people have similar feelings tow…
PHP Commandments
11–20 of 117 posts
Re: PHP Commandments
#12Re: PHP Commandments
#13Re: PHP Commandments
#148. NEVER create a file of useful functions, even if it's called helpers.php This smacks of such a broken thinking process, it makes my teeth itch. If you have commonly-used functions, they should be integrated with the commonly-used parts of your code. Example function used for debugging: function preint_r($arr) { echo ' '; print_r($arr); echo ' '; } Where would something like this fit, if not a general helpers.php t…
In debugging.php alongside with other debugging helpers?
Re: PHP Commandments
#15Ubuntu's focus on the newest and latest is primarily on the desktop not the server. Better yet recommend user stick to LTS releases with 5 years of support.
Re: PHP Commandments
#16Asking humbly because I do that and don't yet understand why it's bad / the alternative.
Re: PHP Commandments
#178. NEVER create a file of useful functions, even if it's called helpers.php This smacks of such a broken thinking process, it makes my teeth itch. If you have commonly-used functions, they should be integrated with the commonly-used parts of your code. Example function used for debugging: function preint_r($arr) { echo ' '; print_r($arr); echo ' '; } Where would something like this fit, if not a general helpers.php t…