note 83427 rejected from language.oop5.visibility by bjori
| From: | bjori@php.net | Date: | Mon, 26 May 2008 11:38:37 +0000 |
| Subject: | note 83427 rejected from language.oop5.visibility by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-139791@lists.php.net to get a copy of this message | ||
Note Submitter: ted-talks at codeoflife dot ca
----
I recently began updating my code to PHP 5 standands by adding the visibility prefaces: public,
protected, private. I then discovered that serialized objects from the database weren't updated
as I thought they would be.
Before updating:
[code]
object(Foo) {
["bar"]=>
string(0) "banana"
}
[/code]
After adding visibility and viewing an unserialized Foo object:
[code]
object(Foo) {
["bar:protected"]=>
string(0) ""
["bar"]=>
string(6) "banana"
}
[/code]
During unserlialization, it seems to have created two different "bar" variables.. one
public and one protected.
Any idea why PHP would be doing this? It completely messes up my framework.
Thanks.