note 116092 added to function.get-object-vars
| From: | beat | Date: | Fri, 07 Nov 2014 23:39:14 +0000 |
| Subject: | note 116092 added to function.get-object-vars | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-200847@lists.php.net to get a copy of this message | ||
If your object contains a reference, beware that you might get references for all object properties
in the array values, thus when changing values in the array, they may change the object too
(confirmed and not yet fixed PHP bug https://bugs.php.net/bug.php?id=66961 affecting all
PHP versions up to at least 5.6.2 and 5.5.18 and 5.4.34).
This 10-years old comment tried reporting this: http://php.net/manual/en/function.get-object-vars.php#40515
but its exemple was incomplete. See bug report for example.
----
Server IP: 72.52.91.14
Probable Submitter: 85.5.173.99
----
Manual Page -- http://php.net/manual/en/function.get-object-vars.php
Edit -- https://master.php.net/note/edit/116092
Del: integrated -- https://master.php.net/note/delete/116092/integrated
Del: useless -- https://master.php.net/note/delete/116092/useless
Del: bad code -- https://master.php.net/note/delete/116092/bad+code
Del: spam -- https://master.php.net/note/delete/116092/spam
Del: non-english -- https://master.php.net/note/delete/116092/non-english
Del: in docs -- https://master.php.net/note/delete/116092/in+docs
Del: other reasons-- https://master.php.net/note/delete/116092
Reject -- https://master.php.net/note/reject/116092
Search -- https://master.php.net/manage/user-notes.php