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 1. What does a special set of tags <?= and ?> do in PHP?

Ans. The output is displayed directly to the browser.

Is it helpful? Add Comment View Comments
Ques 2. What's the difference between include and require? -
Ans. It's how they handle failures. If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.
Is it helpful? Add Comment View Comments
Ques 3. I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what's the problem?
Ans. PHP Interpreter treats numbers beginning with 0 as octal.
Is it helpful? Add Comment View Comments
Ques 4. Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?
Ans. In this example it wouldn't matter, since the variable is all by itself, but if you were to print something like "{$a},000,000 mln dollars", then you definitely need to use the braces.
Is it helpful? Add Comment View Comments
Ques 5. How do you define a constant?
Ans. Via define() directive, like define ("MYCONSTANT", 100);
Is it helpful? Add Comment View Comments

Most helpful rated by users:

©2016 WithoutBook