Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82180 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62601 invoked from network); 8 Feb 2015 21:53:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Feb 2015 21:53:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.200 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.200 imap1-2.ox.privateemail.com Received: from [192.64.116.200] ([192.64.116.200:44760] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DA/F6-26926-6FAD7D45 for ; Sun, 08 Feb 2015 16:53:59 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 665F1B00092; Sun, 8 Feb 2015 16:53:55 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap1.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8yTemkjmRK57; Sun, 8 Feb 2015 16:53:55 -0500 (EST) Received: from oa-res-26-240.wireless.abdn.ac.uk (oa-res-26-240.wireless.abdn.ac.uk [137.50.26.240]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 9E71EB0007B; Sun, 8 Feb 2015 16:53:54 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) In-Reply-To: <54D7D9C9.8040403@mabe.berlin> Date: Sun, 8 Feb 2015 21:53:52 +0000 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: References: <54D7C2CD.7040707@mabe.berlin> <74E307F8-6E5B-4CA6-8639-A3D89FF63A87@ajf.me> <54D7D9C9.8040403@mabe.berlin> To: Marc Bennewitz X-Mailer: Apple Mail (2.2070.6) Subject: Re: [PHP-DEV] PHP6 artifact - binary strings From: ajf@ajf.me (Andrea Faulds) Hi, > On 8 Feb 2015, at 21:48, Marc Bennewitz wrote: >=20 > Wrapping all in objects isn't an option. This would only add = unnecessary overhead and only move the issue to a different place. I don=E2=80=99t see why not. Objects are generally exempt from type = juggling, except for conversion to strings. Surely that=E2=80=99s what you want? >> This would break existing code which was made =E2=80=9CPHP = 6-ready=E2=80=9D. > I don't think so. If a string was declared as binary it should be = binary else it is a wrong declaration and a bug. It already is binary, though. PHP=E2=80=99s strings are binary, they = always have been. The reason that we have (binary) is because PHP 6 was = going to make (string) a synonym of (unicode) instead. >> Also, we already support bitwise operations on strings, I don=E2=80=99t= know what you=E2=80=99re on about there... >=20 > Sorry I wasn't clear. > I mean the bitwise shift operators see http://3v4l.org/MBadR That would be a BC break, and the kind of non-obvious evil one Derick = doesn=E2=80=99t like much. Though I can=E2=80=99t talk: I already =E2=80=98broke=E2=80=99 bitwise = shifts with the Integer Semantics RFC. -- Andrea Faulds http://ajf.me/