Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65518 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41125 invoked from network); 30 Jan 2013 18:48:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jan 2013 18:48:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=dragoonis@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dragoonis@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.171 as permitted sender) X-PHP-List-Original-Sender: dragoonis@gmail.com X-Host-Fingerprint: 209.85.216.171 mail-qc0-f171.google.com Received: from [209.85.216.171] ([209.85.216.171:46335] helo=mail-qc0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F8/39-09318-0FA69015 for ; Wed, 30 Jan 2013 13:48:17 -0500 Received: by mail-qc0-f171.google.com with SMTP id d1so869919qca.2 for ; Wed, 30 Jan 2013 10:48:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=Op6zBY6gS9+KYa9QJpLyYfa6oco+2dgyipX4D94/BX0=; b=XmjxfISjIrjlkX0Rmxe50g3xtmnkzxhQc6z7wywtBIxR+9SDPzkUhIarlrrxDtPzc1 bV6R46TJvEoeOH626jME3ALM2T9by5nsRNm3oXyeN2kHIne4yueH33O61+hIBYxxjl2O sUW2DqSnjMaryRfHezR+q9zYbeGZ3zs3l78b4SHSg4BEJ6erYfZL0KN+I93KLVrbC/8v IxKDDFZaiL20siJnZwBmhPhwHm20tF8ZjsjYfgPl/ZNZieDeJHVlHo2JlfFJ9rQ37jHh mV+0kHHDcmhz/a/ihkbiKo5VLth/QIxCole9DKB+XFz8Be2YllGpLEUrcT/vUzQzDcu0 5Usw== MIME-Version: 1.0 X-Received: by 10.49.128.231 with SMTP id nr7mr7061124qeb.49.1359571694238; Wed, 30 Jan 2013 10:48:14 -0800 (PST) Received: by 10.229.126.75 with HTTP; Wed, 30 Jan 2013 10:48:14 -0800 (PST) In-Reply-To: References: <1359498582.20362.YahooMailNeo@web133002.mail.ir2.yahoo.com> <51085497.3090504@sugarcrm.com> <1359560655.44471.YahooMailNeo@web133004.mail.ir2.yahoo.com> <51096387.3030909@sugarcrm.com> Date: Wed, 30 Jan 2013 18:48:14 +0000 Message-ID: To: Ferenc Kovacs Cc: Stas Malyshev , "internals@lists.php.net" , hakre Content-Type: multipart/alternative; boundary=047d7b6d9f1ce1ba9904d485f331 Subject: Re: [PHP-DEV] echo new SplFileObject(__FILE__); From: dragoonis@gmail.com (Paul Dragoonis) --047d7b6d9f1ce1ba9904d485f331 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I also agree that we don't need to fix this, nor break BC. It is confusing as hell but it's there now and changing it would be more disruptive. Is there a desire from anyone to gracefully throw E_DEPRECATED in a future version of PHP 5.x when someone tries to __toString() the SplFileObject but only get back a single line ? That's the only "plan forward" I can see feasible if we decided to do anything, otherwise we should move on. On Wed, Jan 30, 2013 at 6:44 PM, Ferenc Kovacs wrote: > 2013.01.30. 19:16, "Stas Malyshev" ezt =EDrta: > > > > Hi! > > > > > But this isn't that strong of an argument, and I think that following > > > what SplFileInfo does would be more sensible (echoing the filename), > but > > > I'm not sure change would worth breaking BC for. > > > > I don't see why it would be more sensible. It's different objects that > > do different things - Info represents file name, more or less, while > > Object represents file contents. I see no reason why it would only make > > sense for Object to return filename, or why we should "fix" something > > that is not broken. > > imo the toString should return something which represents the object and > the filename satisfy that better than a "random" line from the file. > but I agree that this isn't a real concern and doesn't need fixing. > > > -- > > Stanislav Malyshev, Software Architect > > SugarCRM: http://www.sugarcrm.com/ > > (408)454-6900 ext. 227 > --047d7b6d9f1ce1ba9904d485f331--