#37270 [Opn->Bgs]: incompatibility 4.4.2 vs. 5.1.3 ?

From: Date: Tue, 02 May 2006 07:10:34 +0000
Subject: #37270 [Opn->Bgs]: incompatibility 4.4.2 vs. 5.1.3 ?
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-96467@lists.php.net to get a copy of this message
ID: 37270 Updated by: mike@php.net Reported By: lacak at users dot sourceforge dot net -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: Windows 98 PHP Version: 5.1.3 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 Turn on error displaying and you'll see "only variables can be passed by reference". "$v=..." as function argument is an expression. Please use a support channel in future. Previous Comments: ------------------------------------------------------------------------ [2006-05-02 06:43:38] lacak at users dot sourceforge dot net Description: ------------ See please the php reproduce code. In PHP 4.4.2 returns "Expected result" In PHP 5.1.3 returns "Actual result" Reproduce code: --------------- <?php function a(&$p) { $p=array("a"=>"1", "b"=>2); } function b(&$p) { $p=1; } a($v1=array()); print_r($v1); b($v2=0); var_dump($v2); ?> Expected result: ---------------- Array ( [a] => 1 [b] => 2 ) int(1) Actual result: -------------- Array ( ) int(0) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37270&edit=1

« previous php.bugs (#96467) next »