Re: a simple question about PHP extension: using user function in my own extension
| From: | Johannes Schlüter | Date: | Tue, 11 Dec 2012 15:15:26 +0000 |
| Subject: | Re: a simple question about PHP extension: using user function in my own extension | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-64257@lists.php.net to get a copy of this message | ||
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