![]() |
Public variable in singleton do not survive
Hi,
I am trying to use singleton in my application. I believed singleton object can hold public variables to be used at any place of my code. But it does not work... Within the same request the singleton loses public vars content. Thanks to anyone who can help me :) PHP Code:
|
Are you replacing the contents of $err->errorList anywhere between those two print_r()s? I ran your code exactly as you posted it and some error was showing twice.
|
Hi Eric,
I don't change the $err content meanwhile, it is just empty when I try to print_r() it... |
try this on for size..
PHP Code:
|
| All times are GMT. The time now is 10:17 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0