1. Question:What is property overloading?

     

    Answer
    Property overloading continues to protect properties by forcing access and manipulation through public methods, yet allowing the data to be accessed as if it were a public property. These methods, known as accessors and mutators, or more informally as getters and setters, are automatically triggered whenever the property is accessed or manipulated, respectively.






    1. Report
  2. Question:What type of inheritance that PHP supports?

     

    Answer
    PHP does not support multiple inheritances. Implementation of multiple interfaces is supported.







    1. Report
  3. Question:What are the abstract class and interface?

     

    Answer
    Abstract class: An abstract class is a class that cannot be instantiated. Abstract classes are intended to be inherited by a class that can be instantiated, better known as a concrete class. Abstract classes can be fully implemented, partially implemented or not implemented at all.

    Interface: An interface defines a general specification for implementing a particular service, declaring the required functions and constants without specifying exactly how it must be implemented.






    1. Report
  4. Question:What is the meaning of a final class and a final method? 

    Answer
    Final keywords indicates that the class or method cannot be extended.






    1. Report
  5. Question:How do you execute a PHP script from the command line? 

    Answer
    Just use the PHP command line interface (CLI) and specify the file name of the script to be executed as follows:
    php script.php






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