Re:PHP 7 deployment at Dailymotion
by mastre_ on Monday October 17, 2016 @09:32PM
(#12731327)
This is not so much a PHP thing as it is a different way of thinking about things. If you know something is supposed to be an integer, you can simply force it to an integer before you do anything with it:
Note: 0 shouldn't be a valid value for something called 'id', since it's likely a db id; if it is, use something other than an empty() check.
[ Parent
| on HN ]
There are no comments on this comment yet.