Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60777 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53494 invoked from network); 7 Jun 2012 19:45:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jun 2012 19:45:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; 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:51195] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/28-11153-5E401DF4 for ; Thu, 07 Jun 2012 15:45:42 -0400 Received: from [192.168.2.230] (ppp-188-174-57-120.dynamic.mnet-online.de [188.174.57.120]) (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 C47BF61BCE; Thu, 7 Jun 2012 21:44:42 +0200 (CEST) To: Adi Mutu Cc: Felipe Pena , PHP Developers Mailing List In-Reply-To: <1339095042.60350.YahooMailNeo@web43512.mail.sp1.yahoo.com> References: <1338926897.37775.YahooMailNeo@web43502.mail.sp1.yahoo.com> <1339095042.60350.YahooMailNeo@web43512.mail.sp1.yahoo.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 07 Jun 2012 21:44:21 +0200 Message-ID: <1339098261.2665.578.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] concatenation operator From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) 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