Date: 06/30/99
- Next message: Jim Winstead: "Re: [PHP-DEV] Bug #1619: apxs and --with-system-regex doesn't combine, causing crash"
- Previous message: Rene' Seindal: "Re: [PHP-DEV] Bug #1619: apxs and --with-system-regex doesn't combine, causing crash"
- In reply to: Chuck Hagenbuch: "Re: [PHP-DEV] Object method as handler functions in PHP4/Zend"
- Next in thread: Stig Bakken: "Re: [PHP-DEV] Object method as handler functions in PHP4/Zend"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 21:19 30/06/99 , Chuck Hagenbuch wrote:
>Quoting Zeev Suraski <zeev <email protected>>:
>
> > If you know you're expecting an object context, make your function accept
> > $obj and $method, and inside the function, call $method() if $obj is
> empty,
> > or $obj->$method() if it isn't.
>
>Would it be possible to add an optional argument specifying an object
>reference to all of the functions that take a function name as a parameter
>(array_walk, usort, etc).
>
>This would allow you to write:
>
>mysort($a, $b, $obj) {}
>
>and call:
>
>$foo = usort($bar, 'mysort', $foo_object);
>
>This at least lets you avoid setting global variables for mysort() to access
>before calling usort.
It shouldn't be a problem (technically possible).
Zeev
-- Zeev Suraski <zeev <email protected>> http://www.zend.com/ For a PGP public key, finger bourbon <email protected>-- PHP Development Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jim Winstead: "Re: [PHP-DEV] Bug #1619: apxs and --with-system-regex doesn't combine, causing crash"
- Previous message: Rene' Seindal: "Re: [PHP-DEV] Bug #1619: apxs and --with-system-regex doesn't combine, causing crash"
- In reply to: Chuck Hagenbuch: "Re: [PHP-DEV] Object method as handler functions in PHP4/Zend"
- Next in thread: Stig Bakken: "Re: [PHP-DEV] Object method as handler functions in PHP4/Zend"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

