Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67325 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15069 invoked from network); 7 May 2013 06:03:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 May 2013 06:03:03 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.99 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.99 smtp99.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.99] ([108.166.43.99:57420] helo=smtp99.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2B/9C-22863-61998815 for ; Tue, 07 May 2013 02:03:02 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp5.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id A68741B009E; Tue, 7 May 2013 02:02:59 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp5.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 2D4761B00A6; Tue, 7 May 2013 02:02:59 -0400 (EDT) Message-ID: <51889912.1090906@sugarcrm.com> Date: Mon, 06 May 2013 23:02:58 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Remi Collet CC: PHP Internals References: <518890C1.7030403@fedoraproject.org> In-Reply-To: <518890C1.7030403@fedoraproject.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [PROPOSAL]Add second to callback of preg_replace_callback From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Here is another example from a real case (Horde_Date) Looks like the case of doing it wrong. In most cases it doesn't even need regexp, in others, generic regexp with post-parsing would probably be more efficient as this seems to do 20+ passes through the string. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227