by Piskvorrr · 13y ago · 0 comments
I'd also add a #10: Use E_ALL | E_STRICT , and don't ignore it. PHP is trying to tell you of many problems, shutting it up is not the right answer.
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.
Probably a lot of people have similar feelings towards Ruby, getting stuff done is what pays the bills.
The reason this works is because -1 is 0xFFFFFFFF.