ID: 34009 User updated by: ast at gmx dot ch Reported By: ast at gmx dot ch Status: Open Bug Type: Scripting Engine problem Operating System: Gentoo Linux PHP Version: 4.4.0 New Comment:
>From the reproduce script: Unexpected result oberserved on - http://nl01.pcextreme.nl/phpinfo.php (PHP 4.4.0, Linux Linux i686) - PHP 4.4.0 cgi hosted by Powweb.com, Apache/1.3.33 (Unix) FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7d PowWeb/1.1, FreeBSD clust05-www01.powweb.com 4.11-RELEASE FreeBSD 4.11-RELEASE #0: Thu Ma i386 - Gentoo linux, PHP 4.4.0, apache 2, x86: http://dev.nei.ch/bugs/php440_notice_bug/phpinfo_gentoo_with_bug.html Correct behavior observed on - dozens / hundreds other servers, e.g. - Windows XP SP 2, PHP 4.4.0 cgi, apache 2, x86 - Gentoo linux, PHP 4.4.0, apache 2, x86: http://dev.nei.ch/bugs/php440_notice_bug/phpinfo_gentoo_without_bug.html (this is another gentoo box, completely unrelated to the other) Previous Comments: ------------------------------------------------------------------------ [2005-08-05 16:41:18] ast at gmx dot ch Sorry, the first link was incorrect :/ (Coding recommendations) http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=153254#153254 ------------------------------------------------------------------------ [2005-08-05 16:27:54] ast at gmx dot ch Description: ------------ Abstract: ------------------- PHP 4.4.0 shows a "Notice: Only variable references should be returned by reference in ..." Notice when it shouldn't. The bug can only be reproduced with PHP 4.4.0. And it can only be reproduced on a few systems, on most it returns the expected result (all test platforms had error_reporting(E_ALL);). Furthermore, code that seems to be equivalent doesn't result in a Notice. And two different systems with almost the same setup don't show the same results. I couldn't isolate the bug further than this. Maybe it's a compile options issue, maybe it has to do with the scope of variables, I don't know. Disclaimer: ------------------- You may think this is another bogus bug report for the return-by-reference / assign-by-reference / pass-by-reference Notices in PHP 4.4.0. But I'm quite sure it isn't. I've patched our framework and wrote some recommendations on how to code the right way: http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=32907 . But you don't need to follow this link. I just want to point out that this is a real issue. Details: ------------------- Please take a look at the reproduce script. Reproduce code: --------------- http://dev.nei.ch/bugs/php440_notice_bug/php440_notice_bug_on_certain_platforms.phps Expected result: ---------------- Expected result: ---------------- PHP Version is: 4.4.0 no NOTICEs Actual result: -------------- Actual result: -------------- php version is: 4.4.0 Notice: Only variable references should be returned by reference in php440_notice_bug_on_certain_platforms.php on line 23 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34009&edit=1
