Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35028 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5216 invoked by uid 1010); 30 Jan 2008 15:05:49 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 5201 invoked from network); 30 Jan 2008 15:05:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jan 2008 15:05:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:55441] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/D3-14302-B4290A74 for ; Wed, 30 Jan 2008 10:05:49 -0500 Received: from dhcp-172-28-202-237.zrh.corp.google.com (unknown [193.142.125.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 2B4101B3614; Wed, 30 Jan 2008 16:05:45 +0100 (CET) Date: Wed, 30 Jan 2008 16:06:05 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1462818236.20080130160605@marcus-boerger.de> To: Scott MacVicar CC: php-dev In-Reply-To: <47A05612.4020505@php.net> References: <47A05612.4020505@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] BC break with callbacks in 5.3 From: helly@php.net (Marcus Boerger) Hello Scott, actually it was a bug. We, sorry I, did not spot this in earlier versions. Now saying you rely on a bug in PHP 5 to be able to execute PHP 4 code simply does not work. marcus Wednesday, January 30, 2008, 11:48:50 AM, you wrote: > Hi all, > Static callbacks behave differently between 5.2 and 5.3, I recently > noticed this when trying to install PEAR, it printed a warning each time > call_user_func and call_user_func_array was used. > After some tracking down it seems like the callback option for > zend_parse_parameters was backported from 6 but the strict check was > left as is. > class MyClass { function test($var) { echo "$var\n"; } } > MyClass::Test('regular'); > call_user_func(array('MyClass', 'test'), 'callback'); ?>> > The prints E_STRICT errors in PHP 5.2 but in 5.3 you get a single > E_STRICT error followed by a warning for call_user_func. > You can resolve this by adding the static keyword to the method > declaration but regardless it's inconsistent as stands. I think the > strict flag needs to be removed for 5.3. > Patch is attached to resolve the issue. > Scott Best regards, Marcus