An opinionated PHP issue sniffer written in Rust.
Run with the path to your PHP files:
cargo run -- -p examples
You can optionally ignore paths:
cargo run -- --path examples --ignore examples/vendor --ignore examples/tests
Checks if
and elseif
for accidential assignment ($a = $b
rather than $a == $b
)
While it is not technically wrong to use something like if ($a = function()) {}
to
determine if a function returns false or NULL, this is side-effect programming and
can lead to a confusing codebase.
Checks if
and elseif
for incrementing or decrementing variables.
A case of side-effect programming, changing variables inside conditions can be confusing.
Using eval()
is a security risk, allowing possible remote code execution.
This usually means some debug code has been left in the codebase.