Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-06-01 Thread Mark van der Velden
Derick Rethans wrote: On Wed, 21 May 2008, Steph Fox wrote: I looked into it again (and found things I didn't know before). This one's bugging me enough that I braved the Wiki: http://wiki.php.net/rfc/calltimebyref I don't think we should get rid of it, or add a notice/message/whatever. Bec

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-29 Thread Steph Fox
Hi Derick, I don't think we should get rid of it, or add a notice/message/whatever. Because this: http://pastebin.com/d6e055957 could not be done without call time pass by ref right now. So unless that's fixed, we shouldn't deprecate it. Hm. Actually those 'expected values' are wrong because

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-29 Thread Marcus Boerger
Hello Steph, I am all for it: Making sure PHP's 5.3 default is OFF and issueing a warning when turning on starting with 5.3. marcus Wednesday, May 21, 2008, 3:13:04 PM, you wrote: > I looked into it again (and found things I didn't know before). This one's > bugging me enough that I brave

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-29 Thread Derick Rethans
On Wed, 21 May 2008, Steph Fox wrote: > I looked into it again (and found things I didn't know before). This one's > bugging me enough that I braved the Wiki: > > http://wiki.php.net/rfc/calltimebyref I don't think we should get rid of it, or add a notice/message/whatever. Because this: http:/

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-27 Thread Derick Rethans
On Wed, 21 May 2008, Steph Fox wrote: > I looked into it again (and found things I didn't know before). This one's > bugging me enough that I braved the Wiki: > > http://wiki.php.net/rfc/calltimebyref I'm all for it. regards, Derick -- PHP Internals - PHP Runtime Development Mailing List To u

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-27 Thread Stanislav Malyshev
Hi! 1) At call time, nothing significes what is the caller passing, the syntax is the same for passing reference or passing value, so it's prone There's no such thing as "passing reference or passing value". Same thing is always passed - zval. Only thing changing is does the function intend

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-27 Thread Stan Vassilev | FM
Hi, There are three purposes: 1) At call time, nothing significes what is the caller passing, the syntax is the same for passing reference or passing value, so it's prone to confusion. You're passing something which *may* or *may not* be modified if taken as a reference. Quick, is the variab

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-22 Thread Steph Fox
Hi Stan, There is a use case for the function allowing *explicitly* call-time pass by reference, because the function works both ways in subtly different ways. This RFC isn't about whether or not this behaviour should be deprecated. It simply recommends that a warning be thrown by default in

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-22 Thread Stan Vassilev | FM
Hi, Actually PHP ignores default values on parameters followed by required ones. You can't fetch the default value even via Reflection. This is easily detected at compile time so I wonder why the compiler doesn't warn. Regards, Stan Vassilev what stops you from declaring: function someFu

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-22 Thread Alexey Zakhlestin
On Thu, May 22, 2008 at 2:51 PM, LEW21 <[EMAIL PROTECTED]> wrote: > 2008/5/22, Alexey Zakhlestin <[EMAIL PROTECTED]>: >> On Wed, May 21, 2008 at 10:46 PM, LEW21 <[EMAIL PROTECTED]> wrote: >> > Sometimes call time pass by reference is useful, for example when you >> > want to make it possible to o

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-22 Thread LEW21
2008/5/22, Alexey Zakhlestin <[EMAIL PROTECTED]>: > On Wed, May 21, 2008 at 10:46 PM, LEW21 <[EMAIL PROTECTED]> wrote: > > Sometimes call time pass by reference is useful, for example when you > > want to make it possible to omit an param (normally passed by > > reference) by setting null. With

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-22 Thread Stan Vassilev | FM
Hi, There is a use case for the function allowing *explicitly* call-time pass by reference, because the function works both ways in subtly different ways. I have some libraries where I had to have variations of the functions like "AbcByRefr()" and "Abc()", because of this inflexibility. In

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-22 Thread Alexey Zakhlestin
On Wed, May 21, 2008 at 10:46 PM, LEW21 <[EMAIL PROTECTED]> wrote: > Sometimes call time pass by reference is useful, for example when you > want to make it possible to omit an param (normally passed by > reference) by setting null. With no call time pass by reference, > programmers are required to

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-21 Thread LEW21
Sometimes call time pass by reference is useful, for example when you want to make it possible to omit an param (normally passed by reference) by setting null. With no call time pass by reference, programmers are required to write: $null = null; foo($null); Deleting it isn't a good idea, it shoul

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-21 Thread Hector Santos
Steph Fox wrote: I looked into it again (and found things I didn't know before). This one's bugging me enough that I braved the Wiki: http://wiki.php.net/rfc/calltimebyref It has: | Proposal | | Switch allow_call_time_pass_reference off by default in PHP_5_3 | branch. At present there is no

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-21 Thread Steph Fox
For anyone else who doesn't read to the end... Anyway, my opinion is clear on that one: shoot that dead cow. It's been deprecated for years, and you should declare your function prototypes with the param by ref anyway if you need it. All I'm asking is that we throw a warning by default in 5_3,

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-21 Thread Steph Fox
Is it me, or the wiki post talks about param and return by ref? Return by ref is not related to call-time pass by ref, is it? See zend_compile.c. Anyway, my opinion is clear on that one: shoot that dead cow. It's been deprecated for years, and you should declare your function prototypes with

Re: [PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-21 Thread Olivier Hill
Hello Steph, Is it me, or the wiki post talks about param and return by ref? Return by ref is not related to call-time pass by ref, is it? Anyway, my opinion is clear on that one: shoot that dead cow. It's been deprecated for years, and you should declare your function prototypes with the param

[PHP-DEV] RFC: allow_call_pass_by_reference

2008-05-21 Thread Steph Fox
I looked into it again (and found things I didn't know before). This one's bugging me enough that I braved the Wiki: http://wiki.php.net/rfc/calltimebyref - Steph -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php