ID:               44567
 Updated by:       [EMAIL PROTECTED]
 Reported By:      xiezhenye at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         JSON related
 Operating System: any
 PHP Version:      5.2.5
 New Comment:

var_dump($a);

Show:
array(2) {
  [0]=>
  int(1)
  [2]=>
  int(3)
}

Hence, it isn't a bug.


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

[2008-03-30 05:57:57] xiezhenye at gmail dot com

Description:
------------
json_encode return unexpected result on uncontinues array.


Reproduce code:
---------------
$a = array(1,2,3);
echo json_encode($a),"\n";
unset($a[1]);
echo json_encode($a),"\n";

Expected result:
----------------
[1,2,3]
[1,3]


Actual result:
--------------
[1,2,3]
{"0":1,"2":3}



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


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

Reply via email to