Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93848 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23291 invoked from network); 6 Jun 2016 21:33:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2016 21:33:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=sammyk@sammykmedia.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=sammyk@sammykmedia.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sammykmedia.com designates 74.125.82.43 as permitted sender) X-PHP-List-Original-Sender: sammyk@sammykmedia.com X-Host-Fingerprint: 74.125.82.43 mail-wm0-f43.google.com Received: from [74.125.82.43] ([74.125.82.43:35397] helo=mail-wm0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/C6-10476-51CE5575 for ; Mon, 06 Jun 2016 17:33:10 -0400 Received: by mail-wm0-f43.google.com with SMTP id n206so7616313wmf.0 for ; Mon, 06 Jun 2016 14:33:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sammykmedia-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=kK/fY5e7zAWeel3WL8udK07FQH161BC8dbIg6TIsW/4=; b=I1oTFIS/xNZaRVo0q+c4Del0U1ZOwm0W3Qd3RHwCOuyTgpRPvvTxVreKtCbgzQZYgC IjDFCjUKaExJ3W0cw8urE9sefpqKt6vqKY6b0rrpAgTIxgms+HfqRwrPq9iACk+Sdago uMpUq2K9fmLNTF+gTdMEu4nrMVdHe/jrk3jluwRwodbEolDKYvkup768QkENkFRSiQ5b TE3ydix+4wxEy1HS0Ev6Bv42hgKKY7+XRBCuUjqUxtZRbB9xGL1Nr0HyRJ7XkWYqtqGa Q2IjzDGey/xShUcOMcvjGqrZUzHoGSaHM9dxFewUWHz6Q8rCIxQ5Vz4SF7iArd6So/To ydtw== 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; bh=kK/fY5e7zAWeel3WL8udK07FQH161BC8dbIg6TIsW/4=; b=agwQIUUGQy3cyozdU+RhgPHqWwrF3AtZTnm2wTUVvv69fDJTm8x6PfoW2MRqJ7O3wW HLHdA385RWBJyInWNTfHmiJrr5mYlLPiOYI6Fs5QE8aTRbBEbfLyfnQxtBZgWb0X8/Wy xPt7pKTvIT5HaTkvI8PV6iANtM06aWQZZABL5pCaTr1jRTAkqTnnveeCkh48KprpV9CT r6AiCJpYsJuJHSqqkBfz+0036+kXm71Y3K67hpkhXF/IcG5kxi6wWwQYnl6gRLbkbv/j Jr8qPvBMas5Z4nm43VHSM5SdwWNn+hJnYUvpIpnqUNWu4WPAPhAiNBueyddbyYdyRmqv vygQ== X-Gm-Message-State: ALyK8tKzkrtklJ2e3kyr9G0ney24a2R35W7eHdNuRIyAY3kJVwMhEKpRNgrqtFa26hEgnx4wFiQo1V6YAdAK4w== MIME-Version: 1.0 X-Received: by 10.28.229.66 with SMTP id c63mr12984107wmh.65.1465248786494; Mon, 06 Jun 2016 14:33:06 -0700 (PDT) Sender: sammyk@sammykmedia.com Received: by 10.194.32.36 with HTTP; Mon, 6 Jun 2016 14:33:06 -0700 (PDT) X-Originating-IP: [50.252.101.147] In-Reply-To: <7b80be21-b397-c40c-8e80-ff4da4f97634@gmail.com> References: <7b80be21-b397-c40c-8e80-ff4da4f97634@gmail.com> Date: Mon, 6 Jun 2016 17:33:06 -0400 X-Google-Sender-Auth: 5ZBvAWR0dkVBVSL6YH33AEcC6Do Message-ID: To: Stanislav Malyshev Cc: Sara Golemon , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] PHP's handling of BOM (byte order mark) From: me@sammyk.me (Sammy Kaye Powers) Hey Stanislav! > In general, I don't think BOM is a real issue worth messing with the > lexer. Surely, from time to time somebody would use weird editor which > produces BOMs, like editing PHP scripts in Word. Surely, they'd have > weird effects that would force them to spend 5 minutes googling and > fixing it. I don't think it is the reason to spend day-persons of our > collective time to find a fix to this very niche problem and risk > potential BC issues. The issue is that the BOM causes errors that are not easy to Google. Some developers will have issues with their sessions not working. Others with their custom headers not being sent. Others with "strange characters" showing up everywhere. There are myriad reasons why any one of those things could be happening that are not BOM related all the while a BOM is sitting there in their files wearing an "invisibility cloak" so-to-speak. :) So they potentially try 10 things from Stack Overflow that don't fix the issue and give up. I checked GitHub for issues related to this and a few quick searches turned up a handful of issues possibly related to the BOM output: https://github.com/search?l=PHP&q=%22byte+order+mark%22+headers+sent&ref=searchresults&type=Issues&utf8=%E2%9C%93 https://github.com/search?l=PHP&q=bom+headers+sent&ref=searchresults&type=Issues&utf8=%E2%9C%93 But the real hum-dinger was from Stack Overflow: http://stackoverflow.com/search?q=php+bom It does seem to be tripping up a lot of people, especially newbies. As low as the learning curve is for PHP already, I'm curious if you folks think it's advantageous to have PHP ignore the BOM in std out in the case of `{U+FEFF}