Re: RFC: allow_call_pass_by_reference
| From: | Stanislav Malyshev | Date: | Wed, 28 May 2008 06:23:54 +0000 |
| Subject: | Re: RFC: allow_call_pass_by_reference | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37937@lists.php.net to get a copy of this message | ||
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 proneThere's no such thing as "passing reference or passing value". Same thing is always passed - zval. Only thing changing is does the function intend to modify it. That depends on function semantics.
I'd rather all those be explicit( require pass/return by val, require pass/return by refr: "&", accepts both "&?"), and the strict cases throw errors when the contract is not met at both sides.Believe me, you not, unless you want to turn PHP into C. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com