From: ile at dennisgiese dot de Operating system: Win XP Sp3 PHP version: 5.3.0 PHP Bug Type: Feature/Change Request Bug description: Call-time pass-by-reference deprecated -> undeprecate
Description: ------------ Please undreprecate Call-Time pass-by-reference, since it is a fully supported and used way of programming style in almost EVERY serious and "big" language! Reproduce code: --------------- If you have any kind of class or stack of functions you surely want to keep lines of code as short as possible. on the other hand you surely don't want to "copy" your variables just to call a function... example: building an XML document, while using a (sub)function in order to create only sligthly different paths: private function _prepareRequest() { //[some other code] $this->_StoreInterval("from",&$xmlwriter,$this->startdate); $this->_StoreInterval("to",&$xmlwriter,$this->enddate); //[some other code] } private function _StoreInterval($kind,&$xmlwriter,$date) { $xmlwriter->startElement($kind); $xmlwriter->writeElement("day",date("d",$date)); $xmlwriter->writeElement("month",date("m",$date)); $xmlwriter->writeElement("year",date("Y",$date)); $xmlwriter->writeElement("hour",date("H",$date)); $xmlwriter->endElement(); } Expected result: ---------------- in 5.3.0 this still works, but got an warning because this is "deprecated"... Actual result: -------------- actually this should be working anyway, since i don't want to waste memory just to copy and paste back results from this subfunction. if this won't work it makes - to some extend - building functions useles. -- Edit bug report at http://bugs.php.net/?id=49249&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49249&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49249&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49249&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49249&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49249&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49249&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49249&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49249&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49249&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49249&r=support Expected behavior: http://bugs.php.net/fix.php?id=49249&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49249&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49249&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49249&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49249&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49249&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49249&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49249&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49249&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49249&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49249&r=mysqlcfg