Re: How expensive are function_exists() calls?
| From: | Kenan Sulayman | Date: | Wed, 04 Mar 2009 13:20:52 +0000 |
| Subject: | Re: How expensive are function_exists() calls? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-43247@lists.php.net to get a copy of this message | ||
Update:
Reached: Average: 1.3338460335041E-5 seconds / 817542.
Shape:
Average: ( $seconds ) seconds / ( $iterations ).
--
(c) Kenan Sulayman
Freelance Designer and Programmer
Life's Live Poetry
2009/3/4 Kenan Sulayman <kureal@kkooporation.de>
> Hello Mike!
>
> Depending on how you'd define expensive, it may variate.
> Normally, on websites function_exists(x) ain't expensive.
>
> Altrought function_exists needed 0.000077009201049805 seconds to execute.
> Do you think, that's pretty expensive ?
>
> Your,
> --
> (c) Kenan Sulayman
> Freelance Designer and Programmer
>
> Life's Live Poetry
>
>
> 2009/3/4 mike <mike503@gmail.com>
>
> I am trying to figure out a strategy for multiple output formats on a
>> site, and it seems like I can have functions defined by default, but
>> have them defined -after- I've included the targetted format first.
>>
>> However that would require
>>
>> file1.php:
>>
>> function foo() {}
>>
>> file2.php
>>
>> if(!function_exists('foo')) {
>> function foo() {}
>> }
>>
>> Is this a very expensive thing to do? There would be a good number of
>> functions that would be leveraging this. Is it a no-no? or is it
>> pretty cheap?
>>
>> Thanks
>> - mike
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>