Closed AndrewDryga closed 10 years ago
master~/pfff/tests/php/scheck $ cat /tmp/test.php <?php
function foo($bar) { return $baz; }
function some_function($x) { }
some_function(function($bar) { return $baz; });
~/pfff/scheck /tmp/test.php
using / for php_root [1G[m1 / 1[0m/tmp/test.php:5:11: CHECK: Use of undeclared variable $baz (did you mean $bar?). /tmp/test.php:14:13: CHECK: Use of undeclared variable $baz in lambda. See http://php.net/manual/en/functions.anonymous.php and the 'use' keyword.
It works for me. Do you have a recent version of pfff?
let me know if this still does not work for you
Hi,
This code throws warning:
This code don't throw warning:
Even since there are same mistakes in both examples.