Exemplo n.º 1
0
 public function foo($a)
 {
     //ERROR: unused variable, because of the typo below
     $im_service = vars_bar($a);
     //ERROR: typo
     if ($im_servce === false) {
         return 1;
     }
     return 2;
 }
Exemplo n.º 2
0
function test_strict_var()
{
    $vars = array();
    foreach ($vars as $var) {
        vars_bar($var);
        //ERROR: unused variable, should be declared outide because it's used later
        $nested_var = 1;
    }
    //ERROR: use of undefined variable
    vars_bar($nested_var);
}