note 21269 deleted from function.preg-replace-callback by sniper

From: Date: Tue, 30 Sep 2003 12:27:00 +0000
Subject: note 21269 deleted from function.preg-replace-callback by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-57457@lists.php.net to get a copy of this message
Note Submitter: kompadre@nomail.com ---- Some times when passing $this as a reference won't work, is good to try to "global" $this in the method itself. <? preg_replace_callback(pattern, Array($this, 'method'), $str_to_replace); function method() { global $this; // Do what you want... } ?>

« previous php.notes (#57457) next »