[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] [doc-en] master: Don't pass objects by-ref, unless really needed
From:       "Christoph M. Becker" <noreply () php ! net>
Date:       2021-08-31 12:28:20
Message-ID: FmfRWvCpncu3gTfK43lcx7tqog8MS0AOxHjvde2aTI () main ! php ! net
[Download RAW message or body]

Author: Christoph M. Becker (cmb69)
Date: 2021-08-31T14:28:35+02:00

Commit: https://github.com/php/doc-en/commit/e72a6312b92af40004161b6a8843f18e08fcc5d5
Raw diff: https://github.com/php/doc-en/commit/e72a6312b92af40004161b6a8843f18e08fcc5d5.diff


Don't pass objects by-ref, unless really needed

This appears to be a leftover from PHP 4 times.

Changed paths:
  M  reference/funchand/functions/register-tick-function.xml


Diff:

diff --git a/reference/funchand/functions/register-tick-function.xml \
b/reference/funchand/functions/register-tick-function.xml index \
                812a2d20c6e..7635d5b2aa5 100644
--- a/reference/funchand/functions/register-tick-function.xml
+++ b/reference/funchand/functions/register-tick-function.xml
@@ -64,7 +64,7 @@ register_tick_function('my_function', true);
 
 // using an object->method
 $object = new my_class();
-register_tick_function(array(&$object, 'my_method'), true);
+register_tick_function(array($object, 'my_method'), true);
 ?>
 ]]>
     </programlisting>

-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic