Re: Back to call_time_pass_reference - backport PHP 6 behaviour?
| From: | Steph Fox | Date: | Sun, 15 Jun 2008 13:10:59 +0000 |
| Subject: | Re: Back to call_time_pass_reference - backport PHP 6 behaviour? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-38253@lists.php.net to get a copy of this message | ||
That wasn't very clear, sorry...
The logic in HEAD gives nice, sane warnings. The logic in 5_3 gives the same warning for everything, e.g:
Deprecated: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of call_user_func()...
It just doesn't make a lot of sense to keep a warning that tells users to modify the declaration of internal functions, IMHO.
- Steph
----- Original Message ----- From: "Steph Fox" <steph@phparch.com>
To: "internals" <internals@lists.php.net>
Cc: "Dmitry Stogov" <dmitry@zend.com>; "Johannes Schlueter" <johannes@schlueters.de>
Sent: Sunday, June 15, 2008 1:51 PM
Subject: [PHP-DEV] Back to call_time_pass_reference - backport PHP 6 behaviour?
Hi all,
I just noticed (don't ask) there are a couple of checks in zend_do_pass_param() in CVS HEAD that don't exist in PHP_5_3:
if (original_op==ZEND_SEND_REF) {
if (function_ptr &&
function_ptr->common.function_name.v &&
function_ptr->common.type == ZEND_USER_FUNCTION &&
!ARG_SHOULD_BE_SENT_BY_REF(function_ptr, (zend_uint) offset)) {
zend_error(E_DEPRECATED,
"Call-time pass-by-reference has been deprecated; "...
Is there any chance of back-porting the common.type check to 5_3?
- Steph
-- PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php