PageRenderTime 46ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/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
Possible License(s): LGPL-2.1, GPL-2.0, LGPL-3.0, ISC
  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. }