On Tue, 26 Oct 2010 17:41:30 +0100, Pierre Joye <pierre....@gmail.com>
wrote:
hi Gustavo,
I'm not sure it makes sense to add a method to do the opposite of
::isPassedByReference. I'm also not sure about ZEND_SEND_PREFER_REF
being considered as by value in your implementation.
What is the logic/reasoning behind this addition?
It's not the opposite of isPassedByReference(). There are three possible
values for the pass_by_reference "zend_bool" (taking advantage of its
8-bits...):
785 #define ZEND_SEND_BY_VAL 0
786 #define ZEND_SEND_BY_REF 1
787 #define ZEND_SEND_PREFER_REF 2
With ZEND_SEND_PREFER_REF, the parameter is sent by reference, but if it's
not possible, instead of giving an error, it allows the value.
That's what canBePassedByValue tests; whether sending a value would give
an error or not.
--
Gustavo Lopes
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php