callback in classes?
| From: | Steve Alberty | Date: | Wed, 03 Jul 2002 18:28:23 +0000 |
| Subject: | callback in classes? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-85779@lists.php.net to get a copy of this message | ||
Hi,
how can i use a callback function in
preg_replace_callback or set_error_handler;
with functions in classes?
e.g:
<?php
class foo{
function bar($x){
return 'world';
}
}
echo preg_replace_callback('/hello/','bar','hello');
?>
What's the right syntax?
Regards,
Steve