PHP - associative array as an object [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Convert Array to Object PHP I'm creating a simple PHP application and I would like to use YAML files as a data storage. I will get the data as an associative array, with this structure for example: $user = array('username' => 'martin', 'md5password' => '5d41402abc4b2a76b9719d911017c592') However, I would like to extend the associative array with some functions and use the -> operator, so I can write something