|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-07-22 16:32 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 13:00:02 2026 UTC |
Description: ------------ A strange bug with references is present in today's snaphshot (10:30) of PHP 5.1. I call it bug because many old PHP scripts don't work anymore. The problem is that passing an argument to a function expecting a reference when this argument retreived by another function call, causes a Fatal Error. With PHP 5.0.4 it works fine. Reproduce code: --------------- <? function a (&$str) { echo 'hi'; } function b ($str) { return $str . 'hi'; } echo a (b('1')); Expected result: ---------------- hi Actual result: -------------- Fatal error: Only variables can be passed by reference in C:\Program Files\Apache Group\...\test.php on line 11