mardi 30 juin 2015

which way is correct way of checking not null variable

Which is the more effective way of checking $value is not null

if ($value > 0 && $value !== 'null') { }

OR

if (empty($value)) { }

Aucun commentaire:

Enregistrer un commentaire