Variable Comparison etc. 
The following standards should be followed:
if (empty($array)) // false if $array is populated

if ($string == '') // true if $string has no contents

if ($integer) // true if $integer is not 0
if (!$integer) // true if $integer is 0

if ($boolean) // true if $boolean is true
if (!$boolean) // true if $boolean is false
If data type is crucial, use === and !==.
if ($boolean === true) // true if $boolean is 'true', false if $boolean is a true integer

if ($integer !== 0) // true if $integer is not 0, false if $integer is 'true'
Note the following:
$integer = 0;
if ($integer == '') // will return true

$string = '';
if ($string == 0) // will return true

$string = '0';
if ($string == '') // will return false
Copyright © 2024 MH Sub I, LLC dba vBulletin. All rights reserved. vBulletin® is a registered trademark of MH Sub I, LLC dba vBulletin.