Le mercredi 11 mars 2020, 10:59:19 CET Larry Garfield a écrit :
> I forget who it was but someone on the list a while back offered a heuristic
> of "__toString should be used iff there is one and only one logical string
> representation of a value, because the value is conceptually just a string
On Wed, Mar 11, 2020, at 4:57 AM, Nikita Popov wrote:
> On Tue, Mar 10, 2020 at 5:19 PM Côme Chilliet <
> come.chill...@fusiondirectory.org> wrote:
>
> > Le mardi 10 mars 2020, 15:53:41 CET Nikita Popov a écrit :
> > > Would __toString() return $token->text? I'm not strictly opposed to this,
> > >
On Tue, Mar 10, 2020 at 5:19 PM Côme Chilliet <
come.chill...@fusiondirectory.org> wrote:
> Le mardi 10 mars 2020, 15:53:41 CET Nikita Popov a écrit :
> > Would __toString() return $token->text? I'm not strictly opposed to this,
> > but I'd be hard pressed to think of a situation where I would pre
Le mardi 10 mars 2020, 15:53:41 CET Nikita Popov a écrit :
> Would __toString() return $token->text? I'm not strictly opposed to this,
> but I'd be hard pressed to think of a situation where I would prefer
> writing (string) $token over $token->text. Generally, the less magic the
> better :)
My id
On Tue, Mar 10, 2020 at 12:36 PM Côme Chilliet <
come.chill...@fusiondirectory.org> wrote:
> Hello,
>
> I know I’m late, but shouldn't these tokens have a __toString() method?
> It’s not listed in rejected features.
>
Would __toString() return $token->text? I'm not strictly opposed to this,
but I
Hello,
I know I’m late, but shouldn't these tokens have a __toString() method?
It’s not listed in rejected features.
--
Côme Chilliet
FusionDirectory - https://www.fusiondirectory.org
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hi internals,
I've opened voting on https://wiki.php.net/rfc/token_as_object, which adds
a new object-based interface to the tokenizer. Voting closes on 2020-03-20.
Regards,
Nikita