Re: concatenation operator
| From: | Johannes Schlüter | Date: | Thu, 07 Jun 2012 19:44:21 +0000 |
| Subject: | Re: concatenation operator | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-60777@lists.php.net to get a copy of this message | ||
On Thu, 2012-06-07 at 11:50 -0700, Adi Mutu wrote:
>
> that's nice, but i haven't understood a thing...i know something about
> php core and php extensions, but nothing about the Zend engine
> specific.
The mentioned place is directly in the VM, which in general is harder to
understand, but well, it directs to the "concat_function" on
http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_operators.c#1234
Knowing basic C should be enough to understand the code there. The
actual "algorithm" can also easily be guessed (allocate a buffer which
can hold both strings at once and copy them over,the code is a tiny bit
more complex as it tries tore use an existing buffer than allocating
something completely new)
The question is: What do you actually want to know?
> Can you point me to some resources on this topic?
Unfortunately not. The source is the best documentation we have for
that.
johannes