note 13472 deleted from function.preg-replace-callback by sniper
| From: | sniper@php.net | Date: | Tue, 30 Sep 2003 12:25:03 +0000 |
| Subject: | note 13472 deleted from function.preg-replace-callback by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57446@lists.php.net to get a copy of this message | ||
Note Submitter: franco@netwheel.com
----
First, sorry for my elementary english.
On my box the
preg_replace_callback( "/(\w+)/", array( $this, callback_method ), $string)
seems to works properly but, after the execution the object seems to have lost the datas added
from the callback method.
Everyting works well if the $this parameter is passed to callback method as reference like
preg_replace_callback( "/(\w+)/", array( &$this, callback_method ), $string)
Also I noted that the compiler take the reference without any warning message regards
'Call-time pass-by-references deprecated'.
Ciao.