callback function in class

From: Date: Sat, 09 Aug 2003 01:16:05 +0000
Subject: callback function in class
Groups: php.general 
Request: Send a blank email to php-general+get-158968@lists.php.net to get a copy of this message
Basic problem: I need to use preg_replace_callback, and would like the callback parameter to be a function in a class (the same as that which contains the call to preg_replace_callback). "classname::function" doesn't seem to work... Anyone have any ideas? If it helps: I'm creating a class which will basically parse an enhanced version of phbb2's bbcode, and output it to XHTML, PDF, etc. If someone puts [size=small] (I won't be using integers like bbcode does), I need to make sure "small" is a valid word (rejects [size=foo], [size=bar], but [size=large] is okay) -Evan

« previous php.general (#158968) next »