Without Book Interview Questions and Answers | Online Test | Moct Test
Download Android App in your Android Device from Google Play Store
- Search for "Withoutbook Practice Exam Test" in Mobile/Tablet Play Store
Institute Training Search by Name or Email

Exams Attended

Make Homepage

Bookmark this page

Subscribe Email Address

PHP Interview Questions and Answers

Ques 6. How do you pass a variable by value?

Ans. Just like in C++, put an ampersand in front of it, like $a = &$b

Is it helpful? Add Comment View Comments
Ques 7. Will comparison of string "10" and integer 11 work in PHP?
Ans. Yes, internally PHP will cast everything to the integer type, so numbers 10 and 11 will be compared.
Is it helpful? Add Comment View Comments
Ques 8. When are you supposed to use endif to end the conditional statement?
Ans. When the original if was followed by : and then the code block without braces.
Is it helpful? Add Comment View Comments
Ques 9. Explain the ternary conditional operator in PHP?
Ans. Expression preceding the ? is evaluated, if it's true, then the expression preceding the : is executed, otherwise, the expression following : is executed.
E.g $id = isset($_GET['id']) ? $_GET['id'] : false;
Is it helpful? Add Comment View Comments
Ques 10. How do I find out the number of parameters passed into function?
Ans. func_num_args() function returns the number of parameters passed in.
Is it helpful? Add Comment View Comments

Most helpful rated by users:

©2016 WithoutBook