- var_dump: documentation ( source)
- is_numeric: documentation ( source)
<?php
function is_empty($item)
{
return empty($item) && !is_numeric($item);
}
foreach (['', [], null, false, 0, 0.0, '0', [0], ['0']] as $item)
{
var_dump(is_empty($item));
}