Home  >  Q&A  >  body text

PHP singleton pattern

2.png

Why does an error occur when calling a method after internal instantiation?

芯灯芯灯1132 days ago1024

reply all(4)I'll reply

  • 耀通

    耀通2021-10-03 16:52:47

    if(self::$d=null) Error

    if(self::$d==null) Correct

    reply
    3
  • 芯灯

    Careless

    芯灯 · 2021-10-03 17:34:08
  • Cancelreply