|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-12-07 22:40 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 10:00:01 2025 UTC |
Description: ------------ Imploding an array on a Carriage Return (\r) produces unexpected result. Reproduce code: --------------- $TestArray[] = "Hrm...something is fishy here."; $TestArray[] = "It seems that newlines work just fine."; $TestArray[] = "Carriage Returns no so much"; echo "\nNewline:\n"; echo implode("\n",$TestArray); //works echo "\nCarriage Return:\n"; echo implode("\r",$TestArray); //doesn't work Expected result: ---------------- It should return Newline: Hrm...something is fishy here. It seems that newlines work just fine. Carriage Returns no so much Carriage Return: Hrm...something is fishy here. It seems that newlines work just fine. Carriage Returns no so much Actual result: -------------- It produces Newline: Hrm...something is fishy here. It seems that newlines work just fine. Carriage Returns no so much Carriage Return: Carriage Returns no so much just fine. Notice that the CR result looks like buffer issue, returns mashup of two array values.