ID:               43524
 Updated by:       [EMAIL PROTECTED]
 Reported By:      kris at sledge-hammer dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: Mac OS X
 PHP Version:      5.2.5
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

See http://en.wikipedia.org/wiki/Carriage_return

Example:
print "foo\rb"; // boo


Previous Comments:
------------------------------------------------------------------------

[2007-12-07 00:58:05] kris at sledge-hammer dot net

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.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=43524&edit=1

Reply via email to