PHP Interview QUESTIONS
Exam Name | PHP Interview QUESTIONS |
---|---|
Description | PHP Interview QUESTIONS contains the questions from various interview of IT industry.These questions are helpful to crack the IT interview. |
Exam Type | MASTER EXAM |
Authenticity | 9 |
creator | Anirudh(39259) |
.
Question:
How can we check the value of a given variable is a number?
Answer:
Question:
How can we check the value of a given variable is alphanumeric?
Answer:
Question:
How do I check if a given variable is empty?
Answer:
Question:
What does the unset() function means?
Answer:
Question:
What does the unlink() function means?
Answer:
This function returns TRUE on success, or FALSE on failure.
Question:
How do I escape data before storing it into the database?
Answer:
Question:
How can we automatically escape incoming data?
Answer:
Question:
What does the function get_magic_quotes_gpc() means?
Answer:
Question:
Is it possible to remove the HTML tags from data?
Answer:
Question:
How a constant is defined in a PHP script?
Answer:
define (“ACONSTANT”, 123);
Question:
How can you pass a variable by reference?
Answer:
Question:
How is it possible to cast types in PHP?
Answer:
* (int), (integer) – cast to integer
* (bool), (boolean) – cast to boolean
* (float), (double), (real) – cast to float
* (string) – cast to string
* (array) – cast to array
* (object) – cast to object
Question:
How is the ternary conditional operator used in PHP?
Answer:
Expression_1 ? Expression_2 : Expression_3;
Question:
What is the function func_num_args() used for?
Answer:
Question:
What does accessing a class via :: means?
Answer:
Question:
In PHP, objects are they passed by value or by reference?
Answer:
Question:
Are Parent constructors called implicitly inside a class constructor?
Answer:
parent::constructor($value)
Question:
What’s the difference between __sleep and __wakeup?
Answer:
Question:
What is the meaning of a Persistent Cookie?
Answer:
Question:
What is the difference between session_unregister() and session_unset()?
Answer: