PHP 4.0 Bug #7488 Updated: Pass-by-reference problem

From: Date: Tue, 27 Mar 2001 20:32:00 +0000
Subject: PHP 4.0 Bug #7488 Updated: Pass-by-reference problem
Groups: php.dev 
Request: Send a blank email to php-dev+get-50099@lists.php.net to get a copy of this message
ID: 7488 Updated by: torben Reported By: torben@php.net Old-Status: Feedback Status: Open Bug Type: ODBC related Assigned To: Comments: Yup. Here's a breakdown: Using & | allow_call_time_pass_by_reference | Works? | Err? ----------------------------------------------------------- Yes | On | Yes | No No | On | No | No Yes | Off | Yes | Yes No | Off | No | No Which is weird. When I get the error telling me that my arg has been passed by value, it's actually been passed by reference. I also think perhaps that it's just generally a bad idea for a function to depend upon deprecated features of the language, since at the moment it requires call-time pass-by-ref to work. Previous Comments: --------------------------------------------------------------------------- [2001-03-27 10:49:47] kalowsky@php.net is this still the case? --------------------------------------------------------------------------- [2000-10-27 05:07:08] torben@php.net When calling odbc_fetch_into() with three arguments, all works as expected: the result array is passed by reference and results are placed into it. But when using the two-parameter form, the result array becomes the second parameter, which must be passed like this: odbc_fetch_into($rid, &$arr); in order to have the results placed into $arr. If the & is left out, $arr is not modified. However, using & results in the large compile-time error being printed at the beginning of script output unless it's been masked out in php.ini, since forcing pass-by-ref this way is no longer supported. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=7488&edit=2

« previous php.dev (#50099) next »