That’s right because anytime you load a php page, the object(s) will re-create, as you load it for the first time.
You can’t store something in a static var and then expect to be available later when re-loading the page – PHP is different from Java/JSP.
You have to use $_SESSION for that.