Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98318 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4209 invoked from network); 16 Feb 2017 23:18:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Feb 2017 23:18:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.44 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 74.125.82.44 mail-wm0-f44.google.com Received: from [74.125.82.44] ([74.125.82.44:37652] helo=mail-wm0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CB/1C-01562-C3336A85 for ; Thu, 16 Feb 2017 18:18:20 -0500 Received: by mail-wm0-f44.google.com with SMTP id v77so26116559wmv.0 for ; Thu, 16 Feb 2017 15:18:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=wUvTjX0gqIA6rPlyC3EixvQcmaA8amP8RH40HmXhLVI=; b=HU7WWwSBnHjG8NCaGAQRse8tELbSSiO75LQ+duh54QqDKectPK73Rru2ggghlZN0F5 qyHK3LAyh4b/MzZPqNIGQ7wHUz6nUx4qD5BGu8OFh+q7bFb0xdwc4lguAojfq0oCc6YX Nzy7PuDsbC9j6eP8gqlf8Q11pi5pUoShxXmLwqZlb4BfbBWyckBPK23BsDpzBuPptZj4 GHOC410ddht1mVTlIGg335klZj5lmFL0gC2YS3AZ1jVcNOGMEPVnBNf67JiFEoERFiyN jVf/3YF9is4IsM6KUh2q87WdVVwDCGH28DUXScBdfMSrSbUZtD+qE1Tvazu9fn9sR4S4 uOiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wUvTjX0gqIA6rPlyC3EixvQcmaA8amP8RH40HmXhLVI=; b=bn5JIYWYtnCQQm/lgxVdlOomWAdczK8tfQ3kT6vwpN4tW4MphPodW4IfTP6VVtbptV gqpFKmbx3RDCmzwyLU4PZWYlXZnBExWx4fOaaOXjBVzRuPlWUZex4MY5iQRIH7wku8mK ERRl1I49MQ9Yalhu5ignqG4hU9p99rSykwuBMS+m4G/GvDrkbhP3Wz/5HWp829wyxLuE Kp8xHlF4jgz52E1kVEJqHNE6am35FYyyRuL+h6m+CUUiWD8Jn/T/kjZOjWeGrOCpf7dq I82i1YlEuDIIf1GLJl3ur9wxb4V2GzZr6Arayiz4OyZFTMIfInYWxqOZOZtc+kp+9R8K Fx5Q== X-Gm-Message-State: AMke39n4Mv0IvHOaUqi05m6yUkdbHDauIIk/o8Os/dQz889OyyDukz3rHzi1HtVcD4wlFU6utCMhos+QyIMSzw== X-Received: by 10.28.105.68 with SMTP id e65mr4267448wmc.44.1487287096936; Thu, 16 Feb 2017 15:18:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.154.47 with HTTP; Thu, 16 Feb 2017 15:18:16 -0800 (PST) In-Reply-To: References: <998bc24d-bd6d-76d3-e99b-ef26fcc76eff@free.fr> Date: Fri, 17 Feb 2017 00:18:16 +0100 Message-ID: To: Nicolas Grekas Cc: Dan Ackroyd , =?UTF-8?Q?Fran=C3=A7ois_Laupretre?= , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1147c81a179a010548ae0394 Subject: Re: [PHP-DEV] [RFC][VOTE] Binary String Deprecation From: nikita.ppv@gmail.com (Nikita Popov) --001a1147c81a179a010548ae0394 Content-Type: text/plain; charset=UTF-8 On Thu, Feb 16, 2017 at 11:25 PM, Nicolas Grekas < nicolas.grekas+php@gmail.com> wrote: > Actually, there is a very nasty side effect to the "b" prefix: it > complicates using the output from token_get_all. You have to be very > experienced (i.e. have feel the pain really) to know about this rare edge > case - yet it must be dealt with if you want a correct parser in userland. > See e.g. > https://github.com/symfony/symfony/blob/8f65fc7ec1418593d433e39abb71d3 > 959eb10a0b/src/Symfony/Component/HttpKernel/Kernel.php#L718 > in Symfony. > It'd have been great if the future would've been freed from this edge case. > Too bad it has been rejected. > I feel your pain... Dealing with binary string lexing is surprisingly subtle. The linked code is a nice illustration, because it handles the binary string case -- but only for b" and not B", which is also valid. I had the same bug in PHP-Parser until recently :/ Nikita --001a1147c81a179a010548ae0394--