Quote:
Originally Posted by Tempest
Agreed with the single quotes.. Far too much code out there that uses double quotes.
As for the int thing, let's all argue about how best to handle them lol...
I actually do a preg_match on all values that are supposed to be pure integers so I can catch invalid data. i.e.:
preg_match('/^[+-]?\d+$/', (string)$value)
|
Speaking of preg_match, to everyone out there not using the latest version yet, if you have been using ereg you need to stop and start using preg_match, as ereg has become deprecated.
same goes for the split() function, which is very common across people's code so better off with explode in most cases.