PHP WEB DEVELOPMENT PART - 1 PROBABLE MOST IMPORTANT INTERVIEW QUESTIONS AND ANSWERS MADE BY ME GENERALLY ASKED IN PITANGENT ANALYTICS AND TECHNOLOGY SOLUTIONS PVT. LTD. FOR FRESHERS
PHP WEB DEVELOPMENT PART - 1 PROBABLE MOST IMPORTANT INTERVIEW QUESTIONS AND ANSWERS MADE BY ME GENERALLY ASKED IN PITANGENT ANALYTICS AND TECHNOLOGY SOLUTIONS PVT. LTD. FOR FRESHERS
Q1. What is the difference between == and ===?
Ans: == -> This operator is used to check whether the given values are equal or not. If yes, it returns true, otherwise it returns false.
=== -> This operator is used to check whether the given values and it's data types are equal or not.
Q2. What are superglobals in PHP?
Ans: Superglobals in PHP are the pre-defined global variables. All superglobal variables are written in capital letters. For ex. : $_GLOBALS, $_GET, $_POST, $_COOKIES, $_SESSION, $_REQUEST, $_FILES, etc.
Q3. What are variables and constants in PHP?
Ans: Variables = Variables are containers for storing information. A variable start with the $ sign, followed by the name of the variable. For ex. : $x=10; $y="Capgemini";
Constants = Constants are like variables, except that once they are defined they cannot be changed or undefined. Syntax : define(name, value);
For ex. : define("GREETING","Welcome to Capgemini.com");
echo "GREETING";
Q4. What is the difference between echo, print and print_r().
Ans:
Comments
Post a Comment