/tests/php/semantic/empty.php

https://github.com/llvm-djk/pfff · PHP · 12 lines · 5 code · 3 blank · 4 comment · 2 complexity · 10a4893c91513e0f6f86ccea16ea1831 MD5 · raw file

  1. <?php
  2. // http://php.net/manual/en/function.empty.php
  3. // empty() does not generate a warning if the variable does not exist.
  4. // undefined variable error
  5. if($foo) {
  6. }
  7. // no error
  8. if (empty($foo)) {
  9. }