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

From: Date: Tue, 05 Jan 2016 03:38:06 +0000
Subject: Re: [RFC] Normalize token_get_all() output (with flag)
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-90047@lists.php.net to get a copy of this message
Hi! >> 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. I meant for token_name() to do that internally, so that the user can use just token_name() instead of boilerplate code. Sorry for not being clear. > For example: > var_dump(token_name(ord(';'))); // string(1)";" Yes, exactly. -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#90047) next »