note 128732 added to function.get-class-vars

From: Date: Thu, 13 Jul 2023 15:58:29 +0000
Subject: note 128732 added to function.get-class-vars
Groups: php.notes 
Request: Send a blank email to php-notes+get-220691@lists.php.net to get a copy of this message
All values returned are null for me but the keys work so I'm using the following workaround. I'm not sure why this is, perhaps due to using protected properties or a custom __get function. foreach (get_class_vars(get_class($this)) as $K=>$V) { $V = $this->$K; } ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.159.168 (proxied: 2001:1970:5a18:6500:1d39:4b61:36d8:5e05) ---- Manual Page -- https://php.net/manual/en/function.get-class-vars.php Edit -- https://main.php.net/note/edit/128732 Del: integrated -- https://main.php.net/note/delete/128732/integrated Del: useless -- https://main.php.net/note/delete/128732/useless Del: bad code -- https://main.php.net/note/delete/128732/bad+code Del: spam -- https://main.php.net/note/delete/128732/spam Del: non-english -- https://main.php.net/note/delete/128732/non-english Del: in docs -- https://main.php.net/note/delete/128732/in+docs Del: other reasons-- https://main.php.net/note/delete/128732 Reject -- https://main.php.net/note/reject/128732 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#220691) next »