Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64257 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10647 invoked from network); 11 Dec 2012 15:14:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Dec 2012 15:14:50 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:44174] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 64/B9-54245-8ED47C05 for ; Tue, 11 Dec 2012 10:14:49 -0500 Received: from [192.168.2.20] (ppp-93-104-9-186.dynamic.mnet-online.de [93.104.9.186]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 1C77A654A6; Tue, 11 Dec 2012 16:14:46 +0100 (CET) To: Amir Cc: Will Fitch , internals@lists.php.net In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Tue, 11 Dec 2012 16:15:26 +0100 Message-ID: <1355238926.3178.151.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] a simple question about PHP extension: using user function in my own extension From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Tue, 2012-12-11 at 17:55 +0330, Amir wrote: > >It matters as calling userspace functions is in at least 90% of the cases > >the wrong approach and there are better ones. The better approach depends > >on the goal. > >(The only times where it is a good thing to do is when calling a user > >provided callback as in usort() or a method from an object extending an > >internal class s in some iterators etc.) > > *please explain me more about using userspace function problem of if other > one, or example how can I use string API from zend engine, not in php.* There is no string API in Zend. Depending on what you want using C standard library string functions is way more efficient and simpler doable than calling through all the layers of PHP ... johannes