Re: [PHP] Using default argument values in the middle of the argument list

2012-06-04 Thread ma...@behnke.biz
324...@mail.muni.cz hat am 1. Juni 2012 um 21:52 geschrieben: > Hi, > > as I accidentally found out that PHP allows default argument values > to occur not only at the end of parameter list: > > function ( Classname $a, Classname $b = null, Classname $c ) ... > > Unfortunately, documentation does

Re: [PHP] Using default argument values in the middle of the argument list

2012-06-03 Thread Matijn Woudt
On Sun, Jun 3, 2012 at 4:48 PM, oliver gondža wrote: > On Sat, 02 Jun 2012 21:35:28 +0200, Matijn Woudt wrote: > >> It does not state it works only at the end of the list, it states that >> it only makes sense to use it at the end of the argument list to be >> able to call the function with less

Re: [PHP] Using default argument values in the middle of the argument list

2012-06-03 Thread oliver gondža
On Sat, 02 Jun 2012 21:35:28 +0200, Matijn Woudt wrote: It does not state it works only at the end of the list, it states that it only makes sense to use it at the end of the argument list to be able to call the function with less arguments. In case you want to use it as suggested in [2], you c

Re: [PHP] Using default argument values in the middle of the argument list

2012-06-02 Thread Matijn Woudt
On Sat, Jun 2, 2012 at 8:30 PM, oliver gondža wrote: > On Sat, 02 Jun 2012 17:13:55 +0200, Matijn Woudt wrote: > >> >> Hi Oliver, >> >> I think the example at [1] demonstrates that it is possible, but it >> also notes that it is pretty useless. Why are you interested in this? >> >> - Matijn >> >>

Re: [PHP] Using default argument values in the middle of the argument list

2012-06-02 Thread oliver gondža
On Sat, 02 Jun 2012 17:13:55 +0200, Matijn Woudt wrote: Hi Oliver, I think the example at [1] demonstrates that it is possible, but it also notes that it is pretty useless. Why are you interested in this? - Matijn [1] http://www.php.net/manual/en/functions.arguments.php#example-153 Hi, T

Re: [PHP] Using default argument values in the middle of the argument list

2012-06-02 Thread Matijn Woudt
On Fri, Jun 1, 2012 at 9:52 PM, <324...@mail.muni.cz> wrote: > Hi, > > as I accidentally found out that PHP allows default argument values > to occur not only at the end of parameter list: > > function ( Classname $a, Classname $b = null, Classname $c ) ... > > Unfortunately, documentation does no

[PHP] Using default argument values in the middle of the argument list

2012-06-01 Thread 324706
Hi, as I accidentally found out that PHP allows default argument values to occur not only at the end of parameter list: function ( Classname $a, Classname $b = null, Classname $c ) ... Unfortunately, documentation does not state what is supposed to happen in such situation. It appears $b can