1. Question:What is super global variable? Write name of some superglobal variable?

     

    Answer
    The super global variables are predefined variable in PHP.  These are accessible from anywhere within a substantial amount of environment specified information. 
    Name of some super global variable:-
    $_GET[], $_POST[], $_REQUEST[], $_SERVER[], $_SESSION[], $GLOBAL[], $_COOKE[], $_FILES[] and $_ENV[].







    1. Report
  2. Question:What are constructor and destructor?

     

    Answer
    Constructor: It is automatic object creation process. It can call class methods and can accept paramiters.
    Destructor: It is automatic object destruction process. We can use destructors to modify the object destruction process.






    1. Report
  3. Question: What is the difference between print and printf?

     

    Answer
    The difference of print and printf are as the print statement is used output data passed to it, but the printf statement is used to output a blend of static text and dynamic information stored within one or several variable.






    1. Report
  4. Question:Why substr() is used?

     

    Answer
    The substr () function is used to return the part of a string located between a predefined starting offset and length position.







    1. Report
  5. Question:Why explode() is used?

     

    Answer
    The explode () function is used divides the string into an array of substrings.







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