I just copied singleton template from phptherightway
I use PHP 5.6.3 (cli) And I got this error:
Can somebody explain this ?
I just copied singleton template from phptherightway
I use PHP 5.6.3 (cli) And I got this error:
Can somebody explain this ?
It's the late static binding against a private property that's causing the problems.
Either modify the visibility of $instance
to protected
Or modify the references to static::$instance
in getInstance()
to self::$instance