|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-01-17 15:43 UTC] derick@php.net
[2006-01-19 08:31 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 23:00:01 2025 UTC |
Description: ------------ Seems assignment-and-passing by reference becomes broken in PHP 5.1. PHP 4.x and 5.0 work as expected. See sample below. Seems PHP assigns value to $x AFTER calling function f(), but NOT before it. Or - only copy of $x passed to f(), not $x itself (as in 4.0 & 5.0). Reproduce code: --------------- <?php function f(&$m) { $m = 123; } f($x=0); var_dump($x); ?> Expected result: ---------------- int(123) Actual result: -------------- int(0)