Re: [PHP-DEV] echo new SplFileObject(__FILE__);

2013-01-30 Thread Peter Cowburn
On 30 January 2013 18:48, Paul Dragoonis wrote: > 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 ? Absolutely not. -- PHP Internals - PHP Runtime Development M

Re: [PHP-DEV] echo new SplFileObject(__FILE__);

2013-01-30 Thread Paul Dragoonis
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 onl

Re: [PHP-DEV] echo new SplFileObject(__FILE__);

2013-01-30 Thread Ferenc Kovacs
2013.01.30. 19:16, "Stas Malyshev" ezt írta: > > 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 se

Re: [PHP-DEV] echo new SplFileObject(__FILE__);

2013-01-30 Thread Stas Malyshev
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 - In

Re: [PHP-DEV] echo new SplFileObject(__FILE__);

2013-01-30 Thread hakre
> Von: Paul Dragoonis >Gesendet: 16:54 Mittwoch, 30.Januar 2013   > >To be honest, it looks like __toString() was just added in there for the sake >of it without any real thought as to what casting an entier SplFileObject to a >string. This to me implies the entire object( i.e: the entire file

Re: [PHP-DEV] echo new SplFileObject(__FILE__);

2013-01-30 Thread Ferenc Kovacs
On Wed, Jan 30, 2013 at 4:44 PM, hakre wrote: > > > - Ursprüngliche Message - > > > Von: Stas Malyshev > > Gesendet: 0:00 Mittwoch, 30.Januar 2013 > > Betreff: Re: [PHP-DEV] echo new SplFileObject(__FILE__); > > > > > > __toString is

Re: [PHP-DEV] echo new SplFileObject(__FILE__);

2013-01-30 Thread Paul Dragoonis
nis. On Wed, Jan 30, 2013 at 3:44 PM, hakre wrote: > > > - Ursprüngliche Message - > > > Von: Stas Malyshev > > Gesendet: 0:00 Mittwoch, 30.Januar 2013 > > Betreff: Re: [PHP-DEV] echo new SplFileObject(__FILE__); > > > > > > __toString is ma

Re: [PHP-DEV] echo new SplFileObject(__FILE__);

2013-01-30 Thread hakre
- Ursprüngliche Message - > Von: Stas Malyshev > Gesendet: 0:00 Mittwoch, 30.Januar 2013 > Betreff: Re: [PHP-DEV] echo new SplFileObject(__FILE__); > > > __toString is mapped to current() for SplFileObject: > http://www.php.net/manual/en/splfileobject.curr

Re: [PHP-DEV] echo new SplFileObject(__FILE__);

2013-01-29 Thread Ferenc Kovacs
2013.01.30. 0:01, "Stas Malyshev" ezt írta: > > Hi! > > > Can somebody shed some light why: > > > > > > > echo new SplFileObject(__FILE__); > > __toString is mapped to current() for SplFileObject: > http://www.php.net/manual/en/splfileobject.current.php > > it's not documented for some re

Re: [PHP-DEV] echo new SplFileObject(__FILE__);

2013-01-29 Thread Stas Malyshev
Hi! > Can somebody shed some light why: > > > echo new SplFileObject(__FILE__); __toString is mapped to current() for SplFileObject: http://www.php.net/manual/en/splfileobject.current.php it's not documented for some reason, I think it makes sense to file a docs bug on that. -- Stan

Re: [PHP-DEV] echo new SplFileObject(__FILE__);

2013-01-29 Thread Charles PHP
This feels like a bug to me. Why would SplFileObject::__toString return the current line while SplFileInfo::__toString returns file path? On Tue, Jan 29, 2013 at 5:51 PM, Ferenc Kovacs wrote: > On Tue, Jan 29, 2013 at 11:29 PM, hakre wrote: > > > Can somebody shed some light why: > > > >

Re: [PHP-DEV] echo new SplFileObject(__FILE__);

2013-01-29 Thread Ferenc Kovacs
On Tue, Jan 29, 2013 at 11:29 PM, hakre wrote: > Can somebody shed some light why: > > > echo new SplFileObject(__FILE__); > > returns the first line of the file (in that case ` > SplFileInfo has the path and SplFileObject extends from it but it will > return the current line. I do not r

[PHP-DEV] echo new SplFileObject(__FILE__);

2013-01-29 Thread hakre
Can somebody shed some light why:     http://www.php.net/unsub.php