This is a curiosity question. When creating a function, is there a recommended way to order the parameters? I mean, if I am going to create a function that receives 3 parameters, lets say int $a
, $str b
and $mixed $c
, is there a reason to pick one order over another? like prefer function f($a, $b, $c)
instead of function f($c, $b, $c)
based on whatever? like the parameter types or anything else?
I know that optional parameters must always go at the end, but apart of that, is there any standard or practical recommendations that would affect performance or something?
In short, I only want to know if the order of the parameters of the function is always arbitrary or not.
NOTE: my question is about when functions are declared only.