Redefinition of parameter $%s¶
Description¶
Parameters must all have distinct names in a method signature. Before PHP 7.0, no error was emitted, and the last parameter’s value was used. In PHP 7.0 and more recent, it is a compilation error.
Example¶
<?php
function foo($b, $b, $b) {}
?>
Literal Examples¶
Redefinition of parameter $b
Solutions¶
Use all different names for the parameters.