/tests/php/semantic/empty.php
PHP | 12 lines | 5 code | 3 blank | 4 comment | 2 complexity | 10a4893c91513e0f6f86ccea16ea1831 MD5 | raw file
Possible License(s): LGPL-2.1, GPL-2.0, LGPL-3.0, ISC
- <?php
- // http://php.net/manual/en/function.empty.php
- // empty() does not generate a warning if the variable does not exist.
- // undefined variable error
- if($foo) {
- }
- // no error
- if (empty($foo)) {
- }