主页
PHP
PHP empty 关键字
tryphp_keyword_empty2
运行 ❯
×
更改方向
保存代码
更改主题
<?php // A variable that does not exist if(empty($x)) { echo '$x does not exist
'; } // An empty integer if(empty(0)) { echo '0 is empty
'; } // An empty float if(empty(0.0)) { echo '0.0 is empty
'; } // An empty string if(empty("")) { echo '"" is an empty string
'; } // null if(empty(null)) { echo 'null is empty
'; } // A value that is not empty if(empty('A')) { echo '"A" is empty
'; } else { echo '"A" is not empty
'; } ?>