note 73854 added to function.json-encode

From: Date: Tue, 13 Mar 2007 09:01:53 +0000
Subject: note 73854 added to function.json-encode
Groups: php.notes 
Request: Send a blank email to php-notes+get-124400@lists.php.net to get a copy of this message
A follow-up to the post of Ilya Remizov <q-snick at mail dot ru>: The part in the code dealing with objects has to be replaced from $vars = get_class_vars(get_class($var)); to e.g. this: $vars = get_obj_vars($var); If not, you will only get NULL values on the properties, because the values are from the class definition, not the object instance. ---- Server IP: 64.71.164.2 Probable Submitter: 85.221.107.130 ---- Manual Page -- http://www.php.net/manual/en/function.json-encode.php Edit -- https://master.php.net/note/edit/73854 Del: integrated -- https://master.php.net/note/delete/73854/integrated Del: useless -- https://master.php.net/note/delete/73854/useless Del: bad code -- https://master.php.net/note/delete/73854/bad+code Del: spam -- https://master.php.net/note/delete/73854/spam Del: non-english -- https://master.php.net/note/delete/73854/non-english Del: in docs -- https://master.php.net/note/delete/73854/in+docs Del: other reasons-- https://master.php.net/note/delete/73854 Reject -- https://master.php.net/note/reject/73854 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#124400) next »