Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:90037 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54517 invoked from network); 5 Jan 2016 02:00:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2016 02:00:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.215.66 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.215.66 mail-lf0-f66.google.com Received: from [209.85.215.66] ([209.85.215.66:36336] helo=mail-lf0-f66.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 82/68-07292-7D32B865 for ; Mon, 04 Jan 2016 21:00:56 -0500 Received: by mail-lf0-f66.google.com with SMTP id p203so29272023lfa.3 for ; Mon, 04 Jan 2016 18:00:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=T8pOcfaozYCSynz1sRhyN37XAerxMdWq3jtXyvwlYh4=; b=CbdXJaugtfWC+DKzRhT9iHx7r7mzldWASDzkZY+dk9OOprDoG20MoXcwZHZHVqXojp bVxKTEuoG6KzwAiobJ6yrmn3WHaUT3Opv4ZXzY9EsNmyDjr8j1LCxL5cBmPPohGfZacG 6IBAOYxDaSE+uPxR3ETAZ1mGSzizm8YgTFFVtXQs/E4qcrfAbAGjnvEqPzQnCxdmK2Al pEqWInd4dkogS8GT8zPx27pAncFPdewJ8yI8Ko7Eepy5PsFkQ3FKuIkwthHPflqFaJ96 aO48JKZtw9ghJzNJRykEs73Nkk8t0xthfHzPz+ILpuoxEL+kV+zX7XVfEpB0SG/T7Atp dD2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=T8pOcfaozYCSynz1sRhyN37XAerxMdWq3jtXyvwlYh4=; b=HOKGq33n7dpVYd411nG09goITLa4sxr00bm3rogOKrHNi0zL7pu7YOk/R/Qb2yUtLV W1vftJBT5Y3N6woZbcFRtQ6KS5uksKOKDNKcD1itwQkPWrMfBEqsXbdbUqO5W1cX5UA8 29LHfo8M+aFerpKpnlmC79vLtDhFgvCTCcWI1ORe1tijcdLWh4TeE5Er6QHsEz82f7zM Tf3cES73HUxCjjCUZBu5mSRA0yF9xKmOh8lMSvy1RH3J7/YvE20RMk02IdBKrxlIzqJj iwmQjwqUk6SpByQ6oQ0hpQcz97XYAQ2VmceCEqVIoyQ1C2gL7axJ/zVcT/hj3Rc5+QSa N6DQ== X-Gm-Message-State: ALoCoQle47JvMixr8cW0ke+venTNhlP2BLp+ICLL71NHjwe22FklvrJpKr3ZAvPbOVEPYxTwCeyI4K/5cgzld88AAj22YqZQag== MIME-Version: 1.0 X-Received: by 10.25.65.5 with SMTP id o5mr23311650lfa.60.1451959253110; Mon, 04 Jan 2016 18:00:53 -0800 (PST) Sender: php@golemon.com Received: by 10.112.37.44 with HTTP; Mon, 4 Jan 2016 18:00:53 -0800 (PST) X-Originating-IP: [107.198.91.68] In-Reply-To: <568B0C84.7060802@gmail.com> References: <568B0C84.7060802@gmail.com> Date: Mon, 4 Jan 2016 18:00:53 -0800 X-Google-Sender-Auth: 4GbkcLph-wGSFNUnXJt8Qs16myo Message-ID: To: Stanislav Malyshev Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Normalize token_get_all() output (with flag) From: pollita@php.net (Sara Golemon) On Mon, Jan 4, 2016 at 4:21 PM, Stanislav Malyshev 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