Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43247 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96637 invoked from network); 4 Mar 2009 13:20:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Mar 2009 13:20:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=kkooporation@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kkooporation@googlemail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.200.171 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: kkooporation@googlemail.com X-Host-Fingerprint: 209.85.200.171 wf-out-1314.google.com Received: from [209.85.200.171] ([209.85.200.171:46767] helo=wf-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CE/B1-22733-6308EA94 for ; Wed, 04 Mar 2009 08:20:55 -0500 Received: by wf-out-1314.google.com with SMTP id 23so3380285wfg.26 for ; Wed, 04 Mar 2009 05:20:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=S591FrENwMexZSd679MLEvi/7bHutWW75zdR8+qPjWk=; b=ZQFb5IdLwc170yvDAahiuoIDNELvOQaxc3rrZrIpEv62toQpz+hS5B2Nvvsv5y7l8q iXfMRcgOST6Qt8+opswqW5GKWT3T7VZ//GtEqcyB/4yvkMqCQRHCEaVSDjcfnkvCPbrj ccOyqa89fIPIrCz0q9tPkU1n2+fe5RhrIcQO4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=jJjXY5TbJF7v9QCVs2dICAZ6tt85w2NLtcMzhCSRf0Pro4eIaM0a4m5OtdsCvdkXBM 3LdKM3hCXZu0aoNeJ2QVySVdLqkIY6KVQYkKIiHuxg8wlwF4n/j/LCCsyK0RSk3Z6buq C7BI/eaKhI//b+uvmS1lQfmA8ZU6prLlcxxvM= MIME-Version: 1.0 Sender: kkooporation@googlemail.com Received: by 10.142.180.20 with SMTP id c20mr4198751wff.129.1236172852275; Wed, 04 Mar 2009 05:20:52 -0800 (PST) In-Reply-To: References: Date: Wed, 4 Mar 2009 14:20:52 +0100 X-Google-Sender-Auth: 66b578a267a6b037 Message-ID: To: mike Cc: PHP Developers Mailing List Content-Type: multipart/alternative; boundary=000e0cd1744ebda8a704644aeb30 Subject: Re: [PHP-DEV] How expensive are function_exists() calls? From: kureal@kkooporation.de (Kenan Sulayman) --000e0cd1744ebda8a704644aeb30 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 > 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 > > 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 >> >> > --000e0cd1744ebda8a704644aeb30--