ID:               50608
 Updated by:       johan...@php.net
 Reported By:      dlazesz at walla dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Strings related
 Operating System: Ubuntu 9.10, Debian 4.0
 PHP Version:      5.2.12
 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

Use your browser's View source function or the command line for a test
- the <> is treated like HTML by your browser ...


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

[2009-12-29 23:34:30] dlazesz at walla dot com

Description:
------------
last "<" character drops the rest of the field with explode and
preg_split

Reproduce code:
---------------
print_r(explode(",",'"Foo Bar" <foo...@example.com>, Second
address...'));
print_r(preg_split("/,/",'"Foo Bar" <foo...@example.com>, Second
address...'));
print_r(explode(",",'"Foo Bar" foo...@example.com>, Works.'));
print_r(preg_split("/,/",'"Foo Bar" foo...@example.com>, Works.'));
print_r(explode(",",'"Foo Bar" <<foo...@example.com>, Something
missing.'));
print_r(preg_split("/,/",'"Foo Bar" <<foo...@example.com>, Something
missing.'));

Expected result:
----------------
Array ( [0] => "Foo Bar" <foo...@example.com>  [1] => Second address...
)
Array ( [0] => "Foo Bar" <foo...@example.com>  [1] => Second address...
)
Array ( [0] => "Foo Bar" foo...@example.com>  [1] => Works. )
Array ( [0] => "Foo Bar" foo...@example.com>  [1] => Works. )
Array ( [0] => "Foo Bar" <foo...@example.com>  [1] => Something
missing. )
Array ( [0] => "Foo Bar" <foo...@example.com>  [1] => Something
missing. )

Actual result:
--------------
Array ( [0] => "Foo Bar"  [1] => Second address... )
Array ( [0] => "Foo Bar"  [1] => Second address... )
Array ( [0] => "Foo Bar" foo...@example.com>  [1] => Works. )
Array ( [0] => "Foo Bar" foo...@example.com>  [1] => Works. )
Array ( [0] => "Foo Bar" <  [1] => Something missing. )
Array ( [0] => "Foo Bar" <  [1] => Something missing. )


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


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

Reply via email to