I have a function like this (using PHP 7.1):
function myfunction(&$first = null, $second = null)
{ // do something
}
What I want to achieve is to pass null as the first parameter and pass something as the second parameter:
myfunction(null, $something);
When I do that I get the "Only variables can be passed by reference" error.
But of course, null is the default of the first parameter, so the function was designed to handle null as the first parameter.
Is there a way to do it?