Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43245 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93447 invoked from network); 4 Mar 2009 13:07:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Mar 2009 13:07:11 -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.198.229 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.198.229 rv-out-0506.google.com Received: from [209.85.198.229] ([209.85.198.229:17766] helo=rv-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3B/11-22733-EFC7EA94 for ; Wed, 04 Mar 2009 08:07:10 -0500 Received: by rv-out-0506.google.com with SMTP id g9so865750rvb.7 for ; Wed, 04 Mar 2009 05:07:07 -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=Fpf2vdGoMLzvM+kljP0ApVhk5Zrefpnc9uk6Op3vzms=; b=CNT7U56d3EcIXm8UNA9SIppiiJWuf4821jRGFLxShHweqoqzCsEIGcXwbgn1cYFeIc 4DhJvOwkGmK8mS6P0rGmMffCSp9bqM/2FC7tTtZ3+NjgcawN6vW2DxGN4BNWabMmQITb 5CFgLrMXl0eMAioTMXpx/cP3QrZU7p/Xr19/0= 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=raD/F2Qnt8IP9LHXfKbRfAtwcQow+Wdjo/nouIMBhGRvA6RV9F/xgVJzA4UltlViJZ AkT+3XTdO40nBehdorbwtbYtuAcZAPjTK0a9Bsa2daTMxlV7FYOPsmf6yM0kIGM7YSFV tNF0hZJQXTKTODJCJStAJCh6hE9O/nKWVJj98= MIME-Version: 1.0 Sender: kkooporation@googlemail.com Received: by 10.142.84.11 with SMTP id h11mr4188897wfb.232.1236172027518; Wed, 04 Mar 2009 05:07:07 -0800 (PST) In-Reply-To: References: Date: Wed, 4 Mar 2009 14:07:07 +0100 X-Google-Sender-Auth: 589c2fbb479d0a6a Message-ID: To: mike Cc: PHP Developers Mailing List Content-Type: multipart/alternative; boundary=001636e9113094e0b904644aba89 Subject: Re: [PHP-DEV] How expensive are function_exists() calls? From: kureal@kkooporation.de (Kenan Sulayman) --001636e9113094e0b904644aba89 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 > > --001636e9113094e0b904644aba89--