Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49202 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81836 invoked from network); 4 Aug 2010 02:50:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Aug 2010 02:50:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=g.rossolini@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=g.rossolini@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: g.rossolini@gmail.com X-Host-Fingerprint: 209.85.212.170 mail-px0-f170.google.com Received: from [209.85.212.170] ([209.85.212.170:58942] helo=mail-px0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 41/A0-11263-C75D85C4 for ; Tue, 03 Aug 2010 22:50:37 -0400 Received: by pxi6 with SMTP id 6so2006235pxi.29 for ; Tue, 03 Aug 2010 19:50:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=Jaa2ACZERTVsnLJrFM1pO7b0hl6yMwRiF7yRqhfRhHg=; b=eCRu7WDc4wSujOZ1xtQ9T1RT6twH2R+jFKN+uPi3UkxFJoG3ukzyP//AUlDe30pSbA QjWF5DFy2+cIjJaHv1awd004ylfHg1oc9q9/a6S4fpIeBlEK3FdmC7aw/8zkSHJhfS4S R+PvsYJYiXw2MzvF4h+xdUsQA9ASxcZA3o3AM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=mb3dxp4+9XHJCysP06L6oqpM6F6kFtppDw92CQMFCHwG7/7YM1I0unYjG5xSG0On+T IbLMg/Le4riz83EfHIu9GrQU8DeJReem4OZnbn89beE56Zas2aku+Gngs1xQEDu5ZdTr yDUZ6VU6MK0f0LnNM/h57hBShLotHNGIzdhwY= MIME-Version: 1.0 Received: by 10.142.212.6 with SMTP id k6mr3964217wfg.94.1280890233697; Tue, 03 Aug 2010 19:50:33 -0700 (PDT) Received: by 10.142.200.8 with HTTP; Tue, 3 Aug 2010 19:50:33 -0700 (PDT) In-Reply-To: <506C22D022894FB2AE9FAEE22AE649F7@sinahp> References: <9EC2A53FAB8D4BEAA7973FD5765BE428@sinahp> <506C22D022894FB2AE9FAEE22AE649F7@sinahp> Date: Wed, 4 Aug 2010 04:50:33 +0200 Message-ID: To: Shijiang Cc: PHP internals Content-Type: multipart/alternative; boundary=000e0cd32f7c60382e048cf67f8c Subject: Re: [PHP-DEV] Confusing performance of the magic method __call From: g.rossolini@gmail.com (Guillaume Rossolini) --000e0cd32f7c60382e048cf67f8c Content-Type: text/plain; charset=UTF-8 2010/8/4 Shijiang > I was working with PHP 5.2.9 with error_report=E_ALL and display_errors=On > and got no error at all. > > Just now I tried it under PHP 5.3.0 and got the warning. > > Sometimes although I declared the magic method __call(), I want to prevent > it from being called outside the class. > Could someone be kindly enough to tell me why it must be public? > > Thanks. > > Hi, To get the error messages mentioned above, you might want to try the following error reporting level: E_ALL | E_STRICT Please refer to the manual to understand why E_ALL does not actually mean all error levels: http://www.php.net/manual/en/function.error-reporting.php (below "Notes") Also, your php.ini file for PHP 5.3 has details explaining why this version includes E_STRICT (I am guessing you chose the "development" version). As for your other question regarding why the magic method visibility works as it does, the answer has been given in the following bug reports: http://bugs.php.net/bug.php?id=40056 http://bugs.php.net/bug.php?id=44769 Regards, -- Guillaume Rossolini --000e0cd32f7c60382e048cf67f8c--