[nycphp-talk] Inline Functions
Mark Armendariz
nyphp at enobrev.com
Thu Sep 2 02:16:00 EDT 2004
> > know if it's possible in php to do something like this:
> >
> > usort($array, function($a, $b) {
> > if($a == $b) return 0;
> > return ($a < $b) ? -1 : 1;
> > });
>
> Yes but you have to use the create_function function.
> See the manual:
> http://us2.php.net/manual/en/function.create-function.php
>
> Scott Mattocks
> You can use create_function(), but it's rather ugly.
>
> George
Indeed it is. Thanks guys!
Mark
More information about the talk
mailing list