Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25900 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87240 invoked by uid 1010); 1 Oct 2006 11:48:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 87225 invoked from network); 1 Oct 2006 11:48:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Oct 2006 11:48:51 -0000 Authentication-Results: pb1.pair.com header.from=xuefer@gmail.com; sender-id=pass; domainkeys=good 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 64.233.182.188 as permitted sender) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: xuefer@gmail.com X-Host-Fingerprint: 64.233.182.188 nf-out-0910.google.com Linux 2.4/2.6 Received: from [64.233.182.188] ([64.233.182.188:52802] helo=nf-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/B1-05190-12BAF154 for ; Sun, 01 Oct 2006 07:48:51 -0400 Received: by nf-out-0910.google.com with SMTP id y25so1506808nfb for ; Sun, 01 Oct 2006 04:48:46 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=REYyJkf//PyEIKmWscU+c3827tTtwgmi+BVDk8p2GyYrJhBCPr7dFnB1rLU9HAb/3G6zunwierNpW1dJ7NrAgYV9ewiGQ2s/X9PY3G03u1IptWnUszB4ifFeI4cQOKPpG/IooJ5GoTnr6ELnKM/ru1mTEKbi02rpw1qdSgnVBDE= Received: by 10.49.90.4 with SMTP id s4mr4296733nfl; Sun, 01 Oct 2006 04:48:46 -0700 (PDT) Received: by 10.49.37.19 with HTTP; Sun, 1 Oct 2006 04:48:46 -0700 (PDT) Message-ID: <28139bc0610010448x61445c4fg19c8ad08bcb5ddc2@mail.gmail.com> Date: Sun, 1 Oct 2006 19:48:46 +0800 Sender: xuefer@gmail.com To: internals@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 775e9ecaf27d730b Subject: issue of current E_STRICT implemention and possible solution From: phpxcache@gmail.com (phpxcache) the E_STRICT is an error type that issued at compile-time. and user error handler is called, switching to runtime. mixing runtime/compile-time is imho, not good, and cause problem in the real world. the flow: script, include -> compiling, issue E_STRICT -> user error handler. official bug: 1. set up user error handler 2. issue E_STRICT inside class compiling function my_error_handler() { include_once "debugger.class.php"; // #1 $dbg = Debugger::getInstance(); ... } is the behavior defined at point #1 ? if it is allowed, what if wrote "class Debugger { ..." into debugger.class.php ? it just tell me "u cannot declare class inside another class" (something like this) 3rd party bug: XCache is doing nice on late class binding by building "compiler sandbox" for ZendEngine, which clear class_table/function_table temporarily, to make the compiler-env exactly the same every time. but inside the sandbox, functions/classes defined before compiling, is never exists inside the compile-time, leading to a "undefined function" or "undefined class" error inside user error handler. yes, the author should hack, but it's better done in php-src or ZendEngine side. solution propose: 1. never call user error handler for E_STRICT 2. add E_STRICT to pending list and issue it after compiling. (after returning from compile_file)