Re: [RFC] Normalize token_get_all() output (with flag)

From: Date: Tue, 05 Jan 2016 02:00:53 +0000
Subject: Re: [RFC] Normalize token_get_all() output (with flag)
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-90037@lists.php.net to get a copy of this message
On Mon, Jan 4, 2016 at 4:21 PM, Stanislav Malyshev <smalyshev@gmail.com> wrote: > I think it's a great idea, token_get_all() is annoying > to deal with. We'd have to fix token_name though so that this would > still work: > Ah, excellent point! > We could, of course, do something like > $token[0]<=255?$token[0]:token_name($token[0]) - but that looks hacky. > Do you mean have users of the API do that? Or have the implementation of token_name() do that? Because the latter doesn't seem unreasonable at all. For example: var_dump(token_name(ord(';'))); // string(1)";" -Sara

« previous php.internals (#90037) next »