how can I get default parameters in functions i php [duplicate]

  function, php

well I have this:

function proof($x=2,$y=2,$x=2){

return ($x+$y+$z);

}

how can I call function proof only settings $z parameter keeping others default values,

example,

echo proof(..,..,6); // output may be 10

grettings..

Source: Ask PHP

LEAVE A COMMENT