Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

PHP Interview Questions and Answers

Test your skills through the online practice test: PHP Quiz Online Practice Test

Related differences

PHP vs JSP

Ques 21. What does a special set of tags <?= and ?> do in PHP?

The output is displayed directly to the browser.

Is it helpful? Add Comment View Comments
 

Ques 22. What's the difference between include and require? -

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 23. I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what's the problem?

PHP Interpreter treats numbers beginning with 0 as octal.

Is it helpful? Add Comment View Comments
 

Ques 24. Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?

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 25. How do you define a constant?

Via define() directive, like define ("MYCONSTANT", 100);

Is it helpful? Add Comment View Comments
 

Most helpful rated by users:

©2024 WithoutBook