Re: Re: [PHP-DEV] How expensive are function_exists() calls?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2009-03-12 at 21:55 -0700, mike wrote:
> For templating ideas ...
> 
> Would bytecode caches (APC) be able to work properly with this:
> 
> function print_something($args, $output = 'html') {
>       switch($output) {
>            'iphone':
>                print_something_iphone($args);
>                break;
>            default:
>                print_something_html($args);
>                break;
>       }
> }
> 
> 
> or something like this:
> 
> function print_something($args, $output = 'html') {
>       if(function_exists('print_something_'.$output)) {
>            call_user_func('print_something_'.$output);
>       }
> }

I thought we covered a question just like this a week ago... yes this
will not pose a problem for a bytecode cache.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux