php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch pass-by-reference-at-function-invocation for Documentation problem Bug #62406

Patch version 2012-06-25 09:37 UTC

Return to Bug #62406 | Download this patch
Patch Revisions:

Developer: renwooller@gmail.com

$a = 0;
testRef($a);
echo "no ref :    $a \n";
$a = 0;
testRef(&$a);
echo "input ref : $a \n";
$a = 0;
testRef($a);
echo "function definition ref :  $a \n";
$a = 0;
testRef(&$a);
echo "function definition and input ref :  $a \n";
function testRef($a) {
    $a +=1;
}
function testRef2(&$a) {
    $a +=1;
}
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 09:00:02 2026 UTC