CORE PHP PART - 1 PROBABLE INTERVIEW QUESTIONS AND ANSWERS MADE BY ME WHICH ARE GENERALLY ASKED IN vEXPLORE TECHNOLOGIES FOR PHP WEB DEVELOPMENT FOR FRESHERS
CORE PHP PART - 1 PROBABLE INTERVIEW QUESTIONS AND ANSWERS MADE BY ME WHICH ARE GENERALLY ASKED IN vEXPLORE TECHNOLOGIES FOR PHP WEB DEVELOPMENT FOR FRESHERS
Q1. What are superglobals in PHP? Explain $_GET, $_POST,$_SESSION,etc.
Ans: Superglobals in PHP are known as the pre-defined global variables. For ex. : $_SESSION, $_POST,$_COOKIES, $_GET, $_REQUEST, $_FILES, etc.
$_GET = $_GET is the unsecure method. Query string can pass through $_GET method.
$_POST=$_POST is the most secure method. Query string cannot pass through $_POST method.
$_SESSION= $_SESSION is known as the global carrier of data which trace the user activity on website. It is used to send the user information on server. $_SESSION is the unsecure method. $_SESSION does not have any limit. For ex. : Login, Logout, Multipart Form.
Q2. What is the use of header() function?
Ans: header() function in PHP is used to sent the raw HTTP header to the client. For ex. :
header("location:display.php"); ,
header("location:login.php"); , etc.
Q3. How does explode() differ from implode()?
Ans: explode() = explode() function is used to convert from string into array.
For ex. :
Output :
Array ( [0] => Capgemini [1] => was [2] => my [3] => first [4] => company )
implode() = implode() function is used to convert from array into string.
For ex. :
Output :
I love Capgemini
Comments
Post a Comment