PHP Interview Questions



Page 3 of 11«12345»...Last »

Which data type will the $a variable have at the end of the following script?

View the Answer

What will be the following script output?

View the Answer

So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()?

View the Answer

What’s the difference between md5(), crc32() and sha1() crypto on PHP?

View the Answer

What’s the difference between htmlentities() and htmlspecialchars()?

View the Answer

I am writing an application in PHP that outputs a printable version of driving directions. It contains some long sentences, and I am a neat freak, and would like to make sure that no line exceeds 50 characters. How do I accomplish that with PHP?

View the Answer

For printing out strings, there are echo, print and printf. Explain the differences ?

View the Answer

Both examples would provide the same result - $var3 equal to “Welcome to TechInterviews.com”.

View the Answer

How to combine two variables together?

View the Answer

With a heredoc syntax, do I get variable substitution inside the heredoc contents?

View the Answer

What is the difference between characters \023 and \x23?

View the Answer

Would you initialize your strings with single quotes or double quotes?

View the Answer

Why doesn’t the following code print the newline properly?

View the Answer

What’s the special meaning of __sleep and __wakeup?

View the Answer

How do you call a constructor for a parent class?

View the Answer

Page 3 of 11«12345»...Last »