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

     

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







    1. Report
  2. Question:What is the use of header() function in php? 

    Answer
    The header() function sends a raw HTTP header to a client browser.Remember that this function must be called before sending the actual out put.For example, You do not print any HTML element before using this function.
    It is most frequently used to redirect request to get other file. example: 
    The following code can be used for it, 
    header("Location:index.php");






    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 difference between Session and Cookie? 

    Answer
    The main difference between sessions and cookies is that sessions are stored on the server, and cookies are stored on the user’s computers in the text file format. Cookies can not hold multiple variables,But Session can hold multiple variables.We can set expiry for a cookie,The session only remains active as long as the browser is open.Users do not have access to the data you stored in Session,Since it is stored in the server.Session is mainly used for login/logout purpose while cookies using for user activity tracking






    1. Report
  5. Question:Which functions are used to add file in a script? 

    Answer
    Ans: There are four functions are used to add file in a script . Such as:
    ♦ include() function
    ♦ include_once() function
    ♦ require () function
    ♦ require_once() function






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