Is it possible to skip parameters that have default values in a php(5) function call?

后端 未结 5 1736
长情又很酷
长情又很酷 2020-12-02 00:22

I have this:

function foo($a=\'apple\', $b=\'brown\', $c=\'Capulet\') {
    // do something
}

Is something like this possible:



        
5条回答
  •  日久生厌
    2020-12-02 01:07

    Found this, which is probably still correct:

    http://www.webmasterworld.com/php/3758313.htm

    Short answer: no.

    Long answer: yes, in various kludgey ways that are outlined in the above.

提交回复
热议问题