this is Default Arguments
Important thing to note is that Optional parameters can only be specified in the last , so Required parameters come before the Optional parameters in the function definition e.g.
function myFunc($param1,$optional1= 'string',$optional2= 5)
{
}
while calling the function we can call it as
myFunc($param1);
myFunc($param1 , 'new string');
myFunc($param1,'string',10);
but not myFunc($param1,10);
skipping the middle argument is not allowed!!!
The method you have used to call the func is wrong
In your example. there is a slight mistake.
you can't omit middle params. so the following function call
myFunc('something', $optional_value2 = 'test');
is not allowed!
Further $optional_value2 = 'test' cannot appear in the function call...simply 'test' should be passed as an argument to the function.