Echo Return construct method;

后端 未结 6 1746
有刺的猬
有刺的猬 2021-01-25 08:11

6条回答
  •  被撕碎了的回忆
    2021-01-25 08:52

    Generally it's not possible to return a value in a constructor of a class. In this case, $db contains the instance of the class, not the return value.

    You could build a separate function, and have that function return the value:

    toEcho();
    ?>
    

提交回复
热议问题