#50928 [Opn->Bgs]: Function $i param not incremented

From: Date: Wed, 03 Feb 2010 16:33:17 +0000
Subject: #50928 [Opn->Bgs]: Function $i param not incremented
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-147197@lists.php.net to get a copy of this message
 ID:               50928
 Updated by:       derick@php.net
 Reported By:      mstf at mstf dot name dot tr
-Status:           Open
+Status:           Bogus
 Bug Type:         PHP options/info functions
 Operating System: All
 PHP Version:      5.2.12
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php

This is the error I get when running it:

Strict standards: Only variables should be passed by reference in - on
line 6

Call Stack:
    4.3075     111344   1. {main}() -:0



Previous Comments:
------------------------------------------------------------------------

[2010-02-03 15:21:12] mstf at mstf dot name dot tr

Description:
------------
Tested on v5.2.11

function $i param not incremented



Reproduce code:
---------------
<?php
function test(&$i){
	$i = $i + 5;
}

test($i = 1); // But only "$i" work
echo $i
?>

Expected result:
----------------
echo $i; // 6

Actual result:
--------------
echo $i; // 1


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50928&edit=1



Thread (2 messages)

« previous php.bugs (#147197) next »