when to use destructor in php?

后端 未结 4 412
别跟我提以往
别跟我提以往 2020-12-29 02:42

what is the main purpose of a destructor?

could you give any examples of what i might want to run when a object is deleted?

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-29 03:18

    Reference for book

    Destructor often use for close DB connections and fclose () for fopen() connection in class

提交回复
热议问题