- What is an abstract class? or by giving an example they ask what is it called?
- Give a practical example?
- What is method/function overloading and overriding?
- What is MVC? and specially they ask about where the business model or the business rules are defined by expecting the answer as ”model”.
- Have you ever worked with Web services before? Explain a web service? and what is the main advantage of having a webservice by expecting the answer as “Platform independence”.
- Finally most probably about a DB related question. As an example How to solve many to many relationship or maybe an optimization question.
- What are the DBMS’s you have worked with? If so have you ever participate in designing them? How did the process go? and so on.
-
-
$one = true; $two = null; $a = isset($one) && isset($two); $b = isset($one) and isset($two); echo $a; echo $b;
$a will out put false, while $b will out put true and what is the reason for this?
These are small aspects but very important a programmer must know. In the first phrase it uses “&&” operator to bind those two expressions which will give the expected answer. but the second one gives an unexpected answer where “and” operator is used.
The reason behind is the “higher precedence” between these 3 operators,
1. &&
2. =
3. andIn the first condition it will first check for the “&&” operation and then for the “=”
But in the second condition it will first look for the “=” operator and then for the “and”.
In order to fix this you can force the precedence by using parenthesis as follows,
echo $b = (isset($one) and isset($two));
More info about “Operator Precedence“

