note 106635 added to function.preg-replace-callback
| From: | henzeberkheij at gmail dot com | Date: | Wed, 23 Nov 2011 16:23:50 +0000 |
| Subject: | note 106635 added to function.preg-replace-callback | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-184640@lists.php.net to get a copy of this message | ||
also note that when you are using this functionality in a class and you need variables in that
class, you can use a non static function as callback. array($this, functionName) should be enough to
call an function of the class.
Either use create_function if you require the code only once,
use a static class function if no need for accessing variables in that class. or use the array
metioned earlier in my post for having access to class variables or other functions!
----
Server IP: 69.147.83.197
Probable Submitter: 82.157.123.135
----
Manual Page -- http://www.php.net/manual/en/function.preg-replace-callback.php
Edit -- https://master.php.net/note/edit/106635
Del: integrated -- https://master.php.net/note/delete/106635/integrated
Del: useless -- https://master.php.net/note/delete/106635/useless
Del: bad code -- https://master.php.net/note/delete/106635/bad+code
Del: spam -- https://master.php.net/note/delete/106635/spam
Del: non-english -- https://master.php.net/note/delete/106635/non-english
Del: in docs -- https://master.php.net/note/delete/106635/in+docs
Del: other reasons-- https://master.php.net/note/delete/106635
Reject -- https://master.php.net/note/reject/106635
Search -- https://master.php.net/manage/user-notes.php