1. Question:

    What type of inheritance that PHP supports?

     

    Answer

    PHP generally supports single type of inheritance.Allthough All inheritance are supported but multiple not supported and replace by inheritance used in PHP5.







    1. Report
  2. Question:Difference between array_merge() and array_slice()?

     

    Answer

    Array_merge():
    The array_merge() function merges arrays together, returning a single, unified array.

    Array_slice(): The array_slice() function returns a section of an array based on a starting and ending offset value.






    1. Report
  3. Question:What are class and object? 

    Answer
    Class: Classes are intended to represent those real-life items that coder like to manipulate within an application.

    Object: A class provides a basis from which you can create specific instances of the entity the class models, better known as object.That means, an instance of class is called object . Such as $employee = new Employee();






    1. Report
  4. Question:How to initiate a session in PHP? 

    Answer
    The use of the function session_start() lets us activating a session.






    1. Report
  5. Question:Are Parent constructors called implicitly inside a class constructor? 

    Answer
    No, a parent constructor have to be called explicitly as follows:
    
    parent::constructor($value)






    1. Report
Copyright © 2025. Powered by Intellect Software Ltd