Wednesday, March 9, 2016

Interview Questions - 3 - PHP

Interview Questions for PHP


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

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

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

Q4. What’s the output of the ucwords function in this example?

$formatted = ucwords("ASSIGNGMENTSSTORE IS COLLECTION OF INTERVIEW QUESTIONS");

print $formatted;

Q5. 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?

Q6. I want to combine two variables together:

$var1 = 'Welcome to ';
$var2 = 'assignmentsstore.com';

What will work faster? Code sample 1:

$var 3 = $var1.$var2;

Or code sample 2:

$var3 = "$var1$var2";

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

Q8. what is a session?

Q9. How can we know the number of days between two given dates using PHP?

Q10. What is a Persistent Cookie?

Wait for Answers .......Till Next Post.....Interview questions' answers. 

  .Interview Questions - 3 - Answers

Free Download PHP Interview Questions and Answers

No comments:

Post a Comment