Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93642 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16234 invoked from network); 31 May 2016 00:33:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 May 2016 00:33:52 -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.50 as permitted sender) X-PHP-List-Original-Sender: sammyk@sammykmedia.com X-Host-Fingerprint: 74.125.82.50 mail-wm0-f50.google.com Received: from [74.125.82.50] ([74.125.82.50:36478] helo=mail-wm0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FA/53-26200-DEBDC475 for ; Mon, 30 May 2016 20:33:51 -0400 Received: by mail-wm0-f50.google.com with SMTP id n129so106332492wmn.1 for ; Mon, 30 May 2016 17:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sammykmedia-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:date:message-id:subject:from:to; bh=twIrZIhJIAiemj7IkabIO+lWgUHU1PeKRe+BxqCyLto=; b=gVJBA+WPfWtc2i0kY0IyLzhiDWV7xwSFg5jBFR4QpuSjxF0tHVE07pR4tAwRB/jyzt TTuHwaelUIssu3bWZjUy8i5nR3W7ZuJ6pTJWSuwBZa9m1+iWnZpM/CJvgfYW514PuKbX /w6csaZ/FZfEFI0UMhmLLXvHfDkbYEBJVL5aOY5J/yXnrtvGqBbO1rt7hG20AQ785AFQ bXDfVRs31a63JRQ2KukgfaUj2RrmF7ea3tGM1KZotnk92Rgw79vKWlzgnyih1LofAT/h bdUb44WbloEjYq9fzwrkwG2jggarMx/hZk/0RuTgTLFHcTJLSKxPvAZ38oZW2tS7yMRZ 90jA== 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:date:message-id:subject:from :to; bh=twIrZIhJIAiemj7IkabIO+lWgUHU1PeKRe+BxqCyLto=; b=dQeZ5xYSDlzfBFBDxVDAqHv1CMXFv9hoAxUvXywE2anwCj1mLbeQgublM68FcdjrRE UDc2n7NqZheEcqId0xchkpkvRuirBxzeW04mgk88gPHklY1653v+ZFsI7VHofqNh21QN flVw4f0Du+uNv2PUq70dB+xoEfn3ghPmESjj+GcGSWbBEbCm5a8mAlrBsxSVDbC01DAb IAmn84xELnLrqqVbwB461kBH3GEk9xUQKuvQwB3/03nlY4beeVWDIQEnbPFQp5hSKwFB POVVHvaS5PR7ou1mvMXWw7pEEgq0QdNAzieaBUOYhsRNURJR6WxOC8ahzCpikBLIQuSE 9ICw== X-Gm-Message-State: ALyK8tKKAbRdUy0Ctqw5D3XbJhyyk1++s/wPyBGFeysE350AgxXS0chGvh93t3Ml7fHjh+Lpgv2oJ7DiGDrGsA== MIME-Version: 1.0 X-Received: by 10.194.185.211 with SMTP id fe19mr17190916wjc.119.1464654826729; Mon, 30 May 2016 17:33:46 -0700 (PDT) Sender: sammyk@sammykmedia.com Received: by 10.194.125.164 with HTTP; Mon, 30 May 2016 17:33:46 -0700 (PDT) X-Originating-IP: [205.178.124.97] Date: Mon, 30 May 2016 19:33:46 -0500 X-Google-Sender-Auth: 3nDtpZxkdQ1GxyhBfA_YRuZ5VFo Message-ID: To: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: PHP's handling of BOM (byte order mark) From: me@sammyk.me (Sammy Kaye Powers) Hey internals! In a recent discussion on PHP Roundtable, we talked about the byte order mark in php files. If you create a php file with the following: PHP Warning: Cannot modify header information - headers already sent by (output started at %s:1) in %s on line %d But it doesn't seem to return the BOM to std out (but I could be doing this part wrong). If you run it from `php -S`, and load it in a browser, the web server returns a code point \u{feff} as the first code point of the response body. BOM's should not be treated as characters and should not be sent to the output. Is there any reason this should be considered the expected behavior? If not, I'd like to create an RFC to change it. :) Thanks, Sammy Kaye Powers sammyk.me