1. 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
  2. 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.







    1. Report
  3. Question:Between echo () and print () functions which one is the faster and why?

     

    Answer
    Ans: The echo () function is a tad faster because it returns nothing, whereas print () will return 1 if the statement is successfully output, else return 0 if the statement is unsuccessfully output. As result echo () is faster than print ().







    1. Report
  4. Question:Discuss five predefined subscript of of $_FILES super global variable? 

    Answer

    $_FILES[‘upload-name’][‘’name]: The name of the file as uploaded from the client to the server.
    $_FILES[‘upload-name’][‘type’]:
    The MIME type of the uploaded file.
    $_FILES[‘upload-name’][‘size’] :The byte size of the uploaded file.
    $_FILES[‘upload-name’][‘tmp_name’] :
    Once uploaded, the file will be assigned a temporary name before it is moved to its final location.
    $_FILES[‘upload-name’][‘error’]: An upload status code. Despite the name, this variable will be populated even in the case of success.







    1. Report
  5. Question:What is the functionality of the function strstr and stristr? 

    Answer
    Ans:strstr: The strstr() function returns the remainder of a string beginning with the first occurrence of a predefined string.
    stristr: It is same as strstr except the search of for the pattern is case insensitive.







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