[wp-trac] [WordPress Trac] #21839: Audit use of return-by-reference

WordPress Trac wp-trac at lists.automattic.com
Sat Sep 8 02:00:26 UTC 2012


#21839: Audit use of return-by-reference
----------------------------+-----------------------------
 Reporter:  wonderboymusic  |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Performance     |    Version:
 Severity:  normal          |   Keywords:  has-patch
----------------------------+-----------------------------
 (The component for this ticket is Performance because nothing else made
 any sense)

 This has come up in other tickets, and each time it has been recommended
 that we remove the return by reference indicators when present on
 functions and class methods. From php.net:

   ''Do not use return-by-reference to increase performance. The engine
 will automatically optimize this on its own. Only return references when
 you have a valid technical reason to do so.''

 Is there a valid technical reason to still do so? Since PHP5, objects are
 always passed by reference.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21839>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list