That is because $inst
was declared as a static variable.. If you remove the static keyword , then you will get null
the second time.
From the PHP Docs..
A static variable exists only in a local function scope, but it does not lose its value when program execution leaves this scope.