NYCPHP Meetup

NYPHP.org

[nycphp-talk] Callback function in a class

David Mintz dmintz at davidmintz.org
Thu Jun 23 21:44:18 EDT 2005


On Thu, 23 Jun 2005, corey szopinski wrote:

> Brilliant! That was it.
><snip />
> On 6/22/05 7:07 PM, "Dan Cech" <dcech at phpwerx.net> wrote:
>
> > You need:
> >
> > uasort($stores,array(&$this,'sortDistance'));
> >

And if the callback method happens to be static, whether declared static
in PHP 5, or sort of de facto static in PHP 4:

uasort($stores,array(__CLASS__,'sortDistance'));


---
David Mintz
http://davidmintz.org/



More information about the talk mailing list