|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-09-09 06:07 UTC] sterling@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 00:00:01 2025 UTC |
If variables within a class are set by the constructor, then get_object_vars works OK. If they are set after the class object is constructed, then it doesn't work OK. Example: class a { var $b; } $aa = new a(); $aa->b = "Hi"; print_r(get_object_vars($aa); //Result will not be as expected. This error is complicating an effort to persist a class. =================== Related Issue: It does not appear possible to have a variable within a class which is of type class. What a shame.