Sometimes, especially with callbacks functions or inheritance/implementation case, I don't want to use some arguments in method. But they are required by the method interface signature (and I can't change the signature, let's say it's something required via Composer). Example:
// Assuming the class implements an interface with this method:
// public function doSomething($usefull1, $usefull2, $usefull3);
public function doSomething($usefull, $useless_here, $useless_here) {
return something_with($usefull);
}
// ...
In some other languages (let's say Rust), I can ignore these arguments explicitly, which make the code (and intention) more readable. In PHP, it could be this:
public function doSomething($usefull, $_, $_) {
return something_with($usefull);
}
Is this possible in PHP? Did I missed something?
Side note: it's not only for trailing arguments, it could be anywhere in the function declaration