Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36149 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25786 invoked from network); 15 Mar 2008 08:21:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2008 08:21:08 -0000 Authentication-Results: pb1.pair.com header.from=xuefer@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=xuefer@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.146.182 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: xuefer@gmail.com X-Host-Fingerprint: 209.85.146.182 wa-out-1112.google.com Received: from [209.85.146.182] ([209.85.146.182:4136] helo=wa-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 93/30-23794-3F68BD74 for ; Sat, 15 Mar 2008 03:21:08 -0500 Received: by wa-out-1112.google.com with SMTP id l24so4936067waf.17 for ; Sat, 15 Mar 2008 01:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=8Ix9ioRSosqQMCLTqoDSu2Nao69h1ZzOI1+rDY7TDLU=; b=Nch73biFtYjX+aLNmYfmvPtjhO0tdh8ECMW7f3MgPbqCq1Owa1rV1AvUQsjJiEqdGgFxmR4LTYjEDjDH+Rr3cekRamWOoZVqo2hmvM+kdiJOdvXDWA0kr0Y2PDaKsoB8nREj/xp51EAAE5A8GkCuDIYyWlW0Qk7PHt0QvSkxQJc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Zpr5H6lm9QWeQxYvTG0bZ8BaQKy4O09i7h1YWGA7qaVVZD6vIMUWhg6UKYV0vJEsT+YqPj+ytdYM1bJ0UL6cH2YS7p3LJGi5kkquZ+Unt64QKMDtjmDbApUNp5j2rFNEMBKDMDHxcgWbWshymFfTItKLabCxFsPpkn/smoJDuAo= Received: by 10.114.193.1 with SMTP id q1mr13512543waf.75.1205569264156; Sat, 15 Mar 2008 01:21:04 -0700 (PDT) Received: by 10.115.33.6 with HTTP; Sat, 15 Mar 2008 01:21:04 -0700 (PDT) Message-ID: <28139bc0803150121sb6d0ea2i9ecb553dad62e634@mail.gmail.com> Date: Sat, 15 Mar 2008 16:21:04 +0800 To: "Rasmus Lerdorf" Cc: "Marcus Boerger" , "Stanislav Malyshev" , "Dmitry Stogov" , "Andi Gutmans" , internals@lists.php.net In-Reply-To: <47DABFB3.8040705@lerdorf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <06B0D32C7A96544490D18AF653D6BDE5026BA3C7@il-ex1.zend.net> <3210620415.20080314173251@marcus-boerger.de> <47DAAD25.4000507@zend.com> <1539788104.20080314182355@marcus-boerger.de> <47DABFB3.8040705@lerdorf.com> Subject: Re: [PHP-DEV] Patch for opcode caches From: xuefer@gmail.com (Xuefer) > I don't actually see early binding as being much of a problem, the real > problem is when the same class is both early and late bound. If you > consistently always bind early or always bind late, opcode caches should > be quite happy to let you do that. But if you mix the two, things get > chaotic and the problem becomes intractable. We went through all this > in APC a couple of years ago. My initial, somewhat naiive attempt at i'm not sure why i can't reproduce it years ago with apc enabled and i reproduce it with a complex script later. a1.php class a { function aMethod() { echo __FILE__; } } a2.php class a { function aMethod() { echo __FILE__; } } child.php class child extends a { } main1.php which is requested first include "a1.php"; include "child.php"; $child = new child() $child->aMethod(); // aMethod() from a1.php, but what if i update a1.php after child.php is cached? main2.php which is requested later include "a2.php"; include "child.php"; $child = new child(); $child->aMethod(); // aMethod() from a1.php because of early binding is done before cache? or from a2.php? with and without opcode cacher, what is echo'ed if you requests main1 first and main2 later? with the delayed early binding, php behavior exactly the same with opcode cachers enabled or disabled imho, with delayed early binding, every class is binded once when there is no opcode cacher, and opcode cacher can even decide to call bind api before cache. looks like we can always the delay the binding unless we want binary back compatbility for 3rd party modules? correct me if i'm wrong