I want a 0 to be considered as an integer and a '0' to be considered as a string, but empty() considers the '0' as a string in the example below,
$var = '0';
// Evaluates to true because $var is empty
if (empty($var)) {
echo '$var is empty';
}
How can I 'make' empty() to take '0's as strings?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…