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
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
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
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
> 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
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
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
- 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
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
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
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:
> >
> >
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
Can somebody shed some light why:
http://www.php.net/unsub.php
13 matches
Mail list logo