Php: defaulting optional param performance -


in php, there difference in performance if calling function fills in optional parameters (with respective defaults), or leave them blank?

for example:

function foo($id, $a = '', $b = false) { ..... } 

which faster:

foo(1234); 

or

foo(1234, '', false); 

it doesn't matter far speed, helps out readability , code duplication. setting defaults means, don't have set same values in multiple places in code stack means readability , consistency!


Comments