| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2010-09-22 09:56 UTC] salathe@php.net
 
-Status: Open
+Status: Feedback
  [2010-09-22 09:56 UTC] salathe@php.net
  [2010-09-22 09:57 UTC] aharvey@php.net
 
-Status: Feedback
+Status: Open
  [2010-09-22 09:57 UTC] aharvey@php.net
  [2010-09-22 09:57 UTC] aharvey@php.net
 
-Status: Open
+Status: Bogus
  [2010-09-22 09:57 UTC] aharvey@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 10:00:02 2025 UTC | 
Description: ------------ php > echo $e php > ; {"a":1,"b":2} php > $f = json_decode($e); php > var_dump($f); object(stdClass)#2 (2) { ["a"]=> int(1) ["b"]=> int(2) } php > $g=(array)$f; php > echo $f['a']; PHP Fatal error: Cannot use object of type stdClass as array in php shell code on line 1 Expected result: ---------------- php > $a=array('a'=>1,'b'=>2); php > $b = (object)$a; php > $c = (array)$b; php > var_dump($a); array(2) { ["a"]=> int(1) ["b"]=> int(2) } php > echo $c['a']; 1 Actual result: -------------- PHP Fatal error: Cannot use object of type stdClass as array in php shell code on line 1