I have a question for you!
Normally, if you call a callback function within an OOP context you have to use array(&$this, \'callback_function\')
Say your external class looks like this
If your callback function makes no reference to $this, you can call it statically like so:
preg_replace_callback($pattern, 'ExternalClass::callback', $subject);
Otherwise, your method should work in theory.
preg_replace_callback($pattern, array(new ExternalClass, 'callback'), $subject);
Read more about callbacks