Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59640 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83689 invoked from network); 10 Apr 2012 12:36:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Apr 2012 12:36:23 -0000 Authentication-Results: pb1.pair.com header.from=mail_ben_schmidt@yahoo.com.au; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mail_ben_schmidt@yahoo.com.au; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain yahoo.com.au from 98.139.91.232 cause and error) X-PHP-List-Original-Sender: mail_ben_schmidt@yahoo.com.au X-Host-Fingerprint: 98.139.91.232 nm27-vm0.bullet.mail.sp2.yahoo.com Received: from [98.139.91.232] ([98.139.91.232:26778] helo=nm27-vm0.bullet.mail.sp2.yahoo.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/F7-41114-549248F4 for ; Tue, 10 Apr 2012 08:36:22 -0400 Received: from [98.139.91.68] by nm27.bullet.mail.sp2.yahoo.com with NNFMP; 10 Apr 2012 12:36:19 -0000 Received: from [98.136.185.46] by tm8.bullet.mail.sp2.yahoo.com with NNFMP; 10 Apr 2012 12:36:19 -0000 Received: from [127.0.0.1] by smtp107.mail.gq1.yahoo.com with NNFMP; 10 Apr 2012 12:36:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s1024; t=1334061379; bh=+GWwaB27/G0A5k3ffJUxzEFOkDZpA1TlyFuHQbILVBk=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=bgUmyvqG3OxAebyJm3tejlqoXyvpJ3Q0llwfz3ANtN2mSJZmdZdsIS6rZnmseFp3IzgWHesYpjDoUY5jBDQQmNnOBj8t23k0AvH3F27ZaK83mNwMeWU4KvHe+ph0do8ALNGH8pnl3PSrAxUU6YLM0HSf9wGzkncOlBmN0oSlicE= X-Yahoo-Newman-Id: 115297.14476.bm@smtp107.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Lb5uOTIVM1llN5K8igpVAr6qHHaevG8EFiwdRpawLyrqoZN niEG1r7pEFpegOHaIlMD2mlyR_smuaPFCI3GeCHO57mxupfq6VCWsJ023ekE PyNITxBAfQRAfZDk.BJfbtFFv10ZBX91gXlFetnQSVZk6Flh_pF_1tmYnnCL 0hIPeNFYsmOAIdXT0YTn1JZisp6LfigLFjMtCnUEpwGmECTtCb52uUuw2gY1 kOFBnvNtRStRZe7TgMfFQVeQ7.DNzY0Gbd1HZE4Nxr2tXTQlzTrbifAB6zE9 qZLDjGErhdR5m9A5RDnthztP_KT.8wMZY39JQQsHXeEKtOhaX8hXttv1eirC xFduP4urAfaBvbCvIHt2OOPu9Qm70_Pri4zIRo88UqlqwzMzkLG5X0BFtWT7 f4nLeJmxcBvGigvpYKZ2CYgZG.5_mU2aennr1t7NG X-Yahoo-SMTP: enFMnPSswBAexaHyzgobwuUTrYOhZdJ0KRA2SjA- Received: from Thoughtful.local (mail_ben_schmidt@203.158.37.208 with plain) by smtp107.mail.gq1.yahoo.com with SMTP; 10 Apr 2012 05:36:18 -0700 PDT Message-ID: <4F84293E.5070301@yahoo.com.au> Date: Tue, 10 Apr 2012 22:36:14 +1000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: "internals@lists.php.net" References: <4F838E2E.4040206@yahoo.com.au> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Traits and memory size From: mail_ben_schmidt@yahoo.com.au (Ben Schmidt) On 10/04/12 5:42 PM, Stefan Marr wrote: > Hi Ben: > On 10 Apr 2012, at 03:34, Ben Schmidt wrote: > >> During the flattening process, is a copy made of the trait code (or >> bytecode or whatever)? > > Thanks to Dmitry, the op_array, i.e., the methods op codes are not > copied but shared between the methods. > > Thus, there is a certain memory benefit of sharing code in traits, > compared to manual copy and past. Thanks a lot for the answer, Stefan. That is good news. Smiles, Ben.