Identifying PHP unused variables (in Emacs)?

Posted by Roberto Aloi on Stack Overflow See other posts from Stack Overflow or by Roberto Aloi
Published on 2010-03-28T19:23:49Z Indexed on 2010/03/28 19:33 UTC
Read the original article Hit count: 260

Filed under:
|
|

Is it somehow possible to identify unused variables in a PHP file in Emacs?

With other languages, this is possible by using tools such as flymake. I've already enabled Flymake to show syntax errors for my PHP files on the fly, but still it's frustrating that PHP logic errors are sometimes due to situations like:

<?php
$foo = whatever();
$bar = something($fo);
...

Note the typo on $foo that will contribute to the developer's headache and to his exorbitant use of coffee.

© Stack Overflow or respective owner

Related posts about php

Related posts about flymake