[PHP] callback function in class

2003-08-14 Thread Evan Nemerson
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

Re: [PHP] callback function in class

2003-08-14 Thread John W. Holmes
Evan Nemerson wrote: 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? Besides

Re: [PHP] callback function in class

2003-08-14 Thread Evan Nemerson
Never mind. I can create an anonymous function w/ create_function(), and use that as the callback. It's not pretty, but it works. Sorry about wasting everyone's time w/ a brain fart. -Evan On Friday 08 August 2003 06:16 pm, Evan Nemerson wrote: Basic problem: I need to use