You can download latest PHP Interview Questions & answers pdf 2015 from here....
What does a special set of tags <?= and ?> do in PHP?
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.
- I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?
- Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?
How do you define a constant?
How do you pass a variable by value?
- Just like in C++, put an ampersand in front of it, like $a = &$b
Will comparison of string "10" and integer 11 work in PHP?
- Yes, internally PHP will cast everything to the integer type, so numbers 10 and 11 will be compared.
- When are you supposed to use endif to end the conditional statement?
Explain the ternary conditional operator in PHP?
- How do I find out the number of parameters passed into function?
- If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b?
- What’s the difference between accessing a class method via -> and via ::?
- Are objects passed by value or by reference?
How do you call a constructor for a parent class?
What’s the special meaning of __sleep and __wakeup?
- Why doesn’t the following code print the newline properly? <?php
print $str;
?>
Because inside the single quotes the n character is not interpreted as newline, just as a sequence of two characters - and n.
- Would you initialize your strings with single quotes or double quotes?
Computer science engineering jobs for Freshers
Other Important Downloads
27 Jan 2013
Results for:
ReplyDeletephp interview questions and answers pdf
php interview questions and answers
php interview questions
php interview questions and answers for freshers
php interview questions for experienced