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
  6. Question:What are the types of key of array?

     

    Answer
    There are two types of key of array. It can be numerical And associative. 
    Numerical : It stores each array element with numeric index name.Numerical keys bear no relation to the value other than the value's position in the array.
    Associative : It contains characteristic element or string index name. An associative key logicallybears a direct relation to its corresponding value.

    1. Report
  7. Question:

    Why substr() is used?

     

    Answer

    The substr () function is used to return the part of a string str located between a predefined starting offset and length position.
    <?php
    echo substr("Hello World!"6,5);
    ?>


    1. Report
  8. Question:What is the difference between ereg_replace() and eregi_replace()? 

    Answer
    Ans: ereg_replace() function operates much like ereg() , except that its power iis extended to finding and replacing pattern with a replacement sting instead of simply locating it.
    Eregi_replace()  function operates exactly like ereg_replace, except that the search for pattern in string is not case sensitive.


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

     

    Answer
    Constructor:- A constructor is defined as a block of code that automatically executes at the time of object instantiation.
    Destructor:- We can use destructors to modify the object destruction process. Destructors are created like any other method but must be titled_destruct().

    1. Report
  10. Question:What is URL rewriting? 

    Answer
    Using URL rewriting we can convert dynamic URl to static URL Static URLs are known to be better than Dynamic URLs because of a number of reasons 
    1. Static URLs typically Rank better in Search Engines. 
    2. Search Engines are known to index the content of dynamic pages a lot slower compared to static pages. 
    3. Static URLs are always more friendlier looking to the End Users. along with this we can use URL rewriting in adding variables [cookies] to the URL to handle the sessions.

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