4 - Constructor and Destructor in PHP | CodeIgniter 3 Tutorial

Поділитися
Вставка
  • Опубліковано 18 вер 2024
  • Constructor and Destructor in PHP

КОМЕНТАРІ • 5

  • @partho-lia
    @partho-lia 9 місяців тому +1

    I cant express how much helpful your contents are. They are awesome.

  • @partho-lia
    @partho-lia 9 місяців тому

    Constructor:
    The constructor is a method with the same name as the class and is called automatically when an object is created.
    It is used to initialize the object's properties or perform any setup that is necessary before the object is used.
    If a class has a constructor, it is executed immediately when an object is created using the new keyword.
    Destructor:
    The destructor is a method named __destruct within a class.
    It is automatically called when an object is destroyed, either explicitly by the unset() function or when the script finishes execution.
    It is often used to perform cleanup tasks, such as releasing resources or closing database connections.

  • @armeleugeneeke2724
    @armeleugeneeke2724 3 роки тому +1

    You are just amazing sir. You are blessed.

    • @GoPHP
      @GoPHP  3 роки тому

      Thank You Buddy

  • @JishanKhan-qm3rz
    @JishanKhan-qm3rz 2 роки тому

    hello sir i want your help please reply me as soon as possible