|
From: ktukker <kt...@us...> - 2003-03-28 05:40:56
|
CVS commit by ktukker:
Fix old PHP3 style pass by reference stuff, causing people with alternative
php.ini settings head-aches.
From the mail for rick widmer:
"upon a time [PHP-3] the only way to pass a variable by reference to
a function was to add the & when you make the call to the function:
$ReturnValue = myFunction( &$thisIsAReference );
Since then the developers [wisely] decided that it would be better to
move the refrence selection from the call to the function definition.
It seems that PHP was the only language that did references that way,
and a large number of people had problems because of it. Starting with
PHP 4, the 'proper' way to handle passing by reference looks like this:
function myFunction ( &$thisIsAReference ) {
Since all the code written before PHP4 depends on the old method of
passing references, an ini file setting, allow_call_time_pass_reference
was added to allow the old code to continue working. The only reason to
consider the old call method is if your code HAS TO run under PHP-3.
Since that version is so obsolete, I suggest that no new code should
ever use that style of passing references."
M +4 -4 sources/flashservices/app/Gateway.php 1.8
|