Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45896 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45342 invoked from network); 29 Oct 2009 09:49:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Oct 2009 09:49:51 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.158 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 72.14.220.158 fg-out-1718.google.com Received: from [72.14.220.158] ([72.14.220.158:53817] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 33/BB-12066-C3569EA4 for ; Thu, 29 Oct 2009 04:49:48 -0500 Received: by fg-out-1718.google.com with SMTP id d23so798248fga.11 for ; Thu, 29 Oct 2009 02:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.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=VY2i5ASRusJXz9HJI5CSVvvh3afMThKgp5Br0jKKFqE=; b=Zswqja79bCtGfnG3cmJpAVwlDBDhbP4ISWj4AN0yfVK5W4/AOBlOO8WRBWPnnzfQqa qOjoYFZUjdCssyj7Z1TBPMrXRd+9JLSFxL3Uj/oC9/qsTB+IGu5Aw2c0md6M2H7BqqJF gchNg0UUN6YzZlLU9xiaIzG8pL9VAYWsFbV4k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.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=CUey/2EC2YNA1i7bfBu6K/+af7elG7VnuT9QjYFUaoSOOS1NaWG4+CK8RHzFnzhwhD ymbmuAd2tMlEO+qd+z1TmErv/29YUQsKvICd/H5sN1Gh42PFtJymk3dg0g6QhfSh8TaT VSy+fRzAmY3fu8QIvUlNBfycxSa42IGrqGIt0= MIME-Version: 1.0 Sender: tyra3l@gmail.com Received: by 10.239.179.95 with SMTP id c31mr1634718hbg.160.1256809785071; Thu, 29 Oct 2009 02:49:45 -0700 (PDT) In-Reply-To: <1256808892.22624.32.camel@samuel-laptop> References: <1256808892.22624.32.camel@samuel-laptop> Date: Thu, 29 Oct 2009 10:49:45 +0100 X-Google-Sender-Auth: d5a69be828ede5c2 Message-ID: To: Samuel ROZE Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] PHP modules (pecl) and PHP codes (pear) From: info@tyrael.hu (Ferenc Kovacs) On Thu, Oct 29, 2009 at 10:34 AM, Samuel ROZE wrote: > Hi, > > I'll have to develop a function like "parse_url", but "parse_referrer" > which provides informations about the URL (the referrer): provider, > keywords, type of search (search, cache, translation, ...), real page > url... > > I don't really know how I'll do that: using a .ini file like > "get_browser" ? I think it will be too complicated and difficult to > build.. but maybe it is a good idea ? Or create it in C as an > extension... > > I want to know if compiled extensions in C are really faster than an PHP > function ? > > Thanks ! > Samuel. > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > As fas as I know, yes obviously faster, but I think that in your case it doesn't worth the extra time to build this functionality in C, because it is mostly regex based string parser, so the overall overhead is minimal. Tyrael