Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27253 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55253 invoked by uid 1010); 3 Jan 2007 19:59:58 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 55238 invoked from network); 3 Jan 2007 19:59:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jan 2007 19:59:58 -0000 Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 81.169.182.136 cause and error) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from [81.169.182.136] ([81.169.182.136:34075] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/A7-20008-D3B0C954 for ; Wed, 03 Jan 2007 14:59:57 -0500 Received: from baumbart.mbo (dslb-084-063-068-224.pools.arcor-ip.net [84.63.68.224]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id 621F235C1CD; Wed, 3 Jan 2007 20:59:54 +0100 (CET) Date: Wed, 3 Jan 2007 21:00:29 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1173524936.20070103210029@marcus-boerger.de> To: Andrei Zmievski Cc: Antony Dovgal , php-dev Internals In-Reply-To: <0439405cc9736eaffb02975674876cae@gravitonic.com> References: <4592D62F.7070701@zend.com> <674C0731-D508-4AB7-93ED-7ECC60E6ECE0@gravitonic.com> <4592E46C.6010107@zend.com> <4e4ee4507f33374b2afa7678cb9be605@gravitonic.com> <459BFCE1.5040208@zend.com> <0439405cc9736eaffb02975674876cae@gravitonic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Return value of convert_to_*() From: helly@php.net (Marcus Boerger) Hello Andrei, we had a long decision about this issue already and decided that the only reason for "Object..." in 5.0 and 5.1 was the lack of ability to fix __toString() prior to 5.2. The current 5.2/6.0 behavior is what we wanted in the first place and hence correct, or do we need to restart the discussion again? Or am I again missing something here? best regards marcus Wednesday, January 3, 2007, 8:17:53 PM, you wrote: > So you're okay with substr($obj, 0, 3) giving you "Obj" ?? > To me, that seems broken, regardless of whether we had it "working" in > the past. > -Andrei > On Jan 3, 2007, at 10:58 AM, Antony Dovgal wrote: >> On 01/03/2007 09:51 PM, Andrei Zmievski wrote: >>> Only in cases where people blindly pass objects where strings are >>> expected. It won't break anything for those objects that know how to >>> convert themselves. >> >> It still see no reasons for this particular change in behavior. >> It was allowed in the past and I'm sure it should be still okay to do >> it as long as there are no technical reasons to prevent it, which I'm >> unable to see. >> >> >>> On Dec 27, 2006, at 1:23 PM, Antony Dovgal wrote: >>>> On 12/28/2006 12:12 AM, Andrei Zmievski wrote: >>>>>> It's perfectly legal to do it in 5.2 and I don't see why PHP6 is >>>>>> different. >>>>>> IMO it's same as changing the E_RECOVERABLE to E_ERROR - users >>>>>> won't have any way to "workaround" it, even though this was the >>>>>> original intention of E_RECOVERABLE. >>>>> It is not the same. E_ERROR stops execution. Returning FAILURE from >>>>> convert_to_string() is simply a flag that lets calling code know >>>>> what happened. >>>> >>>> Failure in zend_parse_parameters() means that function itself will >>>> not be executed, which is a major change in behaviour and I don't >>>> think we really want it. >>>> >>>> -- >>>> Wbr, Antony Dovgal >> >> >> -- >> Wbr, Antony Dovgal Best regards, Marcus