1. Question:Write the name of 9 Superglobal Variables______. 

    Answer
    "$_GET[ ], $_POST[ ], $_REQUEST[ ], $_SERVER[ ], $_SESSION[ ], $GLOBAL[ ], $_COOKE[ ], $_FILES[ ], $_ENV[ ], "

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

    Answer
    strstr():
           The strstr() function returns the remainder of a string beginning with the first occurrence of a predefined string.Its prototype follows:           
                       string strstr(string str, string occurrence[,bool before_needle])
    stristr():
           Same as strstr() function except the search of for the pattern in case insensitive.

    1. Report
  3. Question:What is regular expression? 

    Answer
    Regular expression provide the foundation of describing or matching data according to defined syntax rules. A regular expression is nothing more than a pattern of characters itself, matched against a certain parcel of text.

    1. Report
  4. 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. Constructors can accept parameters, call class methods or  other functions.PHP recognizes constructor by the  name__construct.  The general  Syntax→
            function__construct([argument1,argument2,….,argumentN]){
                //Class initialization code  
            }
    Destructor:
     We can use destructors to modify the object destruction process.Derstructors are  created like any other method but must be titled    __destruct().   Syntax→    
    function__destruct().

    1. Report
  5. Question:What is object cloning?

     

    Answer
    To remedy the problems with copying ,PHP offers an explicit means for cloning an object.We clone an object by prefacing it with the clone keyword, like so:
                  destinationObject = clone targetObject;

    1. Report
  6. Question:What are the general language features of php? 

    Answer
    Practicality: It requires minimum  knowledge of programming.Power: It has the ability to interface with databases, form and create pages dynamically.Possibility: Developers are rarely bound to any single implementation solution.Price: It is open source software.

    1. Report
  7. Question:Write some of PHP benefits compare to other language? 

    Answer
    - PHP runs on different platforms (Windows, Linux, Unix, etc.)
    - PHP is compatible with almost all servers used today (Apache, IIS, etc.)
    - PHP is FREE to download from the official PHP resource: www.php.net
    - PHP is easy to learn and runs efficiently on the server side

    1. Report
  8. Question:What is a PHP File? 

    Answer
    - PHP files may contain text, HTML tags and scripts
    - PHP files are returned to the browser as plain HTML
    - PHP files have a file extension of ".php", ".php3", or ".phtml"

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

    Answer
    The echo () function is a tad faster than print() function, because it returns nothing, whereas print() function returns 1 if the statement is successfully output.

    1. Report
  10. Question:What is PHP? 

    Answer
    - PHP stands for PHP: Hypertext Preprocessor
    - PHP is a server-side scripting language, like ASP
    - PHP scripts are executed on the server
    - PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL,
    Generic ODBC, etc.)
    - PHP is an open source software (OSS)
    - PHP is free to download and use

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