title: PHP Singleton returns different values with spl_object_hash
body: <p>I'm creating a singleton with PHP like this.</p>
  <pre><code>namespace App\Http\Controllers;
  
  use App\classes\Test;
  
  class TestController extends Controller
  {
      private static $test_obj;
  
      private function __construct()
      {
      }
  
      public static function get()
      {
          if (self::$test_obj === null) {
              self::$test_obj = new Test();
          }
          return self::$test_obj;
      }
  }
  </code></pre>
  <p>Then I tried to test the code like this:</p>
  <pre><code>namespace App\Http\Controllers;
  
  class MainController extends Controller
  {
      public function index()
      {
          $test_obj = TestController::get();
          dd(spl_object_hash($test_obj));
      }
  }
  </code></pre>
  <p>At this point it returns different hash values. But it's supposed to return the same hash value since this is a Singleton right?</p>
  <p>Note - spl_object_id() always returns the same object id though.</p>