Doc #76320 [Opn->Nab]: fail to print carraige-return after end tag in included file

From: Date: Wed, 09 May 2018 19:03:52 +0000
Subject: Doc #76320 [Opn->Nab]: fail to print carraige-return after end tag in included file
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-15683@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76320&edit=1 ID: 76320 Updated by: requinix@php.net Reported by: divinity76 at gmail dot com Summary: fail to print carraige-return after end tag in included file -Status: Open +Status: Not a bug Type: Documentation Problem Package: Documentation problem PHP Version: 7.2.5 Block user comment: N Private report: N New Comment: \r is an old Mac newline. Previous Comments: ------------------------------------------------------------------------ [2018-05-09 18:51:42] divinity76 at gmail dot com Description: ------------ http://php.net/manual/en/language.basic-syntax.phpmode.php says "when the PHP interpreter hits the ?> closing tags, it simply starts outputting whatever it finds (except for an immediately following newline - see instruction separation) until it hits another opening tag", but it seems a carriage return character is also not printed, if encountered. but it is apparently not documented. (ps, i tested this both on a linux system and a windows system, the result is the same on both.) Test script: --------------- <?php $tmp=tmpfile(); fwrite($tmp,"<?php ?>\r"); ob_start(); require(stream_get_meta_data($tmp)['uri']); var_dump(bin2hex(ob_get_clean())); Expected result: ---------------- string(2) "0d" Actual result: -------------- string(0) "" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76320&edit=1

« previous php.doc.bugs (#15683) next »