pfff /tests/php/semantic/empty.php

Language PHP Lines 13
MD5 Hash 10a4893c91513e0f6f86ccea16ea1831
Repository https://github.com/llvm-djk/pfff.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
<?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)) {
}
Back to Top