+ Post New Thread
Results 1 to 3 of 3

Thread: Inheritance In Php ?

  1. #1
    Banned
    Join Date
    Jul 2017
    Posts
    88

    Inheritance In Php ?



    Hello Dear,

    Please Tell Me What Is Inheritance In Php ?

  2. #2
    Member lincy's Avatar
    Join Date
    Jun 2019
    Posts
    38


    Is this useful / helpfull? Yes | No
    Inheritance is very useful if we want to create several similar classes. We can put the common properties and methods in one parent class and then inherit it in the child classes.

  3. #3
    Banned allen025's Avatar
    Join Date
    Jul 2019
    Posts
    52


    Is this useful / helpfull? Yes | No
    With inheritance we can create child classes that are based on the parent class.
    A child class inherits all the properties and methods of its parent, and it can also add additional properties and methods.
    PHP supports single & multilevel inheritance:-
    .It does not support multiple inheritance.
    .In single inheritance, by using the extend keyword a class can inherit methods and members of another base class (only one).
    .PHP uses the concept of inheritance only in the object model.
    .If a class extends another then the parent class is to be declared before the child class.
    .The classes must be defined before they are used.

+ Post New Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
 Protected by : ZB BLOCK  &  StopForumSpam