How to access stdClass

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • electronik
    New Member
    • Dec 2009
    • 5

    How to access stdClass

    Hello!
    My var_export() from $object says:

    Code:
    stdClass::__set_state(array(
       'event_id' => '21',
       'test' => 5,
       'anode' => NULL,
    ))
    I want to access 'anode'.

    How can I do that?
    Last edited by Dormilich; Dec 18 '09, 07:26 AM. Reason: added link to var_export()
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    I want to access 'anode'.
    from where?

    usually (if you don’t define static __set_state())
    Code:
    $objectInstance->anode
    otherwise it depends on that method’s implementation.

    Comment

    Working...