Re: RFC: allow_call_pass_by_reference

From: Date: Tue, 27 May 2008 06:18:25 +0000
Subject: Re: RFC: allow_call_pass_by_reference
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-37914@lists.php.net to get a copy of this message
Hi!
In a perfect world, here's how I'd do it, of course the actual syntax can be something else (this also improves the understanding of the code as it makes the intent explicit, versus implicit at call time, as it is now): --- function foo(& $a) {} // allows only explicit pass by reference foo($a); // illegal, error foo(& $a); // legal, pass by reference
I'm not sure I understand what's the purpose of this. Passing by reference means that function may modify it's parameter. I see no reason why such function should be called with some special syntax, could you explain? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#37914) next »