|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-07-18 19:42 UTC] schristm at gmail dot com
Description:
------------
Hello,
I'm actually using PHP 5.1b3, however it was not an option in the version select box. I just upgrade from PHP 5.1b2 so I know that the issue is definitely with the latest beta release.
I am somehow (randomly) getting strange array keys after parsing cURL data with parse_str().
When this occurs, it's usually the first array key that is garbled. In most cases the key contains either partial serialized data or portions of the path to the script.
Reproduce code:
---------------
<?php
// brief snippits of code:
$result = curl_exec($ch);
$retval = array();
parse_str($result, $retval);
print_r($retval);
?>
Expected result:
----------------
Array
(
[testdomain_com] => pointer
[testdomain2_com] => pointer
)
Actual result:
--------------
Array
(
[a:1:{s:5:\"sttestdomain_com] => pointer
[testdomain2_com] => pointer
)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Mon Mar 16 00:00:01 2026 UTC |
I forgot to mention the output formatting issue. Again, this is very strange! When the array problem indicated above happens, the HTML output of the PHP script gets garbled as well. Certain data that was once included in table cells get bumped out of the table, text is garbled together, etc. For example, in one of my table cells, a phrase is quoted ("domain.com"). When this error occurs, part of an <A href> tag that is located at the bottom of the page gets spliced into the quote. I'm not using CSS or anything like that either. Also, in this same example, I've seen additional </TABLE> tags (magically?) appear where they don't belong, causing stuff to output funny. Hope this helps! Thanks!