PHP interview Question with answer1)<?php
It is result is Two because $varB holds the reference of $varA value an dboth $varA and $varB poin the same value.
echo "Greatest of no".$val;num2;
It is greatest of two number in the given number.
3)what is print_r()?
The print_r() is used to print out the entire content of array.
4)What happened below code
it is return the 152 as an Integer value.gettype() is used to get the datatype.
5)How do find the Ip address of remote machine?
echo "your ip address is ".$SERVER['REMOTE_ADDR'];
what happened in this code?
It is return the output Hello world.the ucfirst() is used to convert the first character in to Uppercase.
7)Difference between include() and require()?
In include() function if can't include the file it is generate error but continue the execution of program but require() function if can't include the file it is generate fatal error in script.
8)How destroy the session in PHP?
In session we are using unset() or session_destroy() function which is used to destroy the session in PHP.
9)What is use of explode() in PHP?
explode() function is used to convert string into array.
10)How do connect PHP with Mysql query?