General Interview Questions on PHP

Ram Pothuraju
  • What is PHP?

  • What are the common usage of PHP?

  • In how many ways you can embed PHP code in an HTML page?

  • What is the purpose of php.ini file?

  • What is escaping to PHP?

  • What do you mean by having PHP as whitespace insensitive?

  • Is PHP a case sensitive language?

  • What are the characteristics of PHP variables?

  • What are the different types of PHP variables?

  • What are rules for naming a PHP variable?

  • What are the rules for determine the "truth" of any value not already of the Boolean type?

  • What is NULL?

  • How will you define a constant in PHP?

  • What is the purpose of constant() function?

  • What are the differences between PHP constants and variables?

  • What are PHP magic constants?

  • What is the purpose of _LINE_ constant?

  • What is the purpose of _FILE_ constant?

  • What is the purpose of _FUNCTION_ constant?

  • What is the purpose of _CLASS_ constant?

  • What is the purpose of _METHOD_ constant?

  • What is the purpose of break statement?

  • What is the purpose of continue statement?

  • Explain the syntax for 'foreach' loop.

  • What is numeric array?

  • What is associate array?

  • What is Multidimensional array?

  • How will you concatenate two strings in PHP?

  • How will you find the length of a string in PHP?

  • How will you locate a string within a string in PHP?

  • How will you get environment variables in PHP?

  • How will you get the browser's details using PHP?

  • How will you generate random numbers using PHP?

  • What is the purpse $_PHP_SELF variable?

  • How will you redirect a page using PHP?

  • How can you display a file download dialog box using PHP?

  • How will you get information sent via get method in PHP?

  • How will you get information sent via post method in PHP?

  • What is the purpse $_REQUEST variable?

  • Which function will you use to create an array?

  • How can you sort an array?

  • What is the difference between single quoted string and double quoted string?

  • How will you concatenate two strings?

  • What is the use of $_REQUEST variable?

  • How will you include the content of a PHP file into another PHP file?

  • What is the difference between include() Function and require() Function?

  • How will you open a file in readonly mode?

  • How will you read a file in php?

  • How will you get the size of a file in php?

  • How will you check if a file exists or not using php?

  • Can you assign the default values to a function parameters?

  • How will you set cookies using PHP?

  • How will you get cookies using PHP?

  • How will you make a check that a cookie is set or not?

  • How will you delete a cookie?

  • How will you start a session in PHP?

  • How will you access session variables in PHP?

  • How will you check if session variable is already set or not in PHP?

  • How will you unset a single session variable?

  • How will you destroy the session?

  • How will you send an email using PHP?

  • What is the purpose of $_FILES variable in PHP?

  • How will you access the uploaded file in PHP?

  • How will you access the actual name of the uploaded file in PHP?

  • How will you access the size of the uploaded file in PHP?

  • How will you access the content type of the uploaded file in PHP?

  • How will you access the error code associated with file upload in PHP?

  • What is the purpose of $GLOBALS variable in PHP?

  • What is the purpose of $_SERVER variable in PHP?

  • What is the purpose of $_COOKIE variable in PHP?

  • What is the purpose of $_SESSION variable in PHP?

  • What is the purpose of $_PHP_SELF variable in PHP?

  • What is the purpose of $php_errormsg variable in PHP?

  • How ereg() function works?

  • How eregi() function works?

  • How split() function works?

  • How preg_match() function works?

  • How preg_split() function works?

  • How will you retrieve the error message using Exception class in PHP when error occured?

  • How will you retrieve code of exception using Exception class in PHP when error occured?

  • How will you retrieve source filename using Exception class in PHP when error occured?

  • How will you retrieve source line using Exception class in PHP when error occured?

  • How will you retrieve stack trace using Exception class in PHP when error occured?

  • How will you retrieve formated string of trace in PHP when error occured?

  • How will you get the current date and time using PHP?

  • What is the purpose of getdate() function?

  • What is the purpose of date() function?

  • How will you connect a MySql database using PHP?

  • How will you create a MySql database using PHP?

  • How will you close a MySql database using PHP?

  • How will you parse an XML document using PHP?

  • Can you create a class in PHP?

  • How will you add a constructor function to a PHP class?

  • How will you add a destructor function to a PHP class?

  • How will you access the reference to same object within the object in PHP?

  • How will you create objects in PHP?

  • How will you call member functions of a class in PHP?

  • What is function overriding?

  • What are interfaces n PHP?



  • What is the use of final keyword?

Post a Comment

0Comments

Post a Comment (0)