- What version control systems have you used (Git, SVN etc.)?
- How do you go about testing your PHP?
- How do you choose a library / module / package ?
Hint 1: Do you take a look if there's a documentation ?
Hint 2: Do you take a look over its Github repository ?
Hint 3: Do you take a look of there are issues opened and if there's some activity ?
- How do you solve a blocker ? For example let's say you encounter a problem in the current project and that's a big blocker and you don't know where is the problem ? How do you start to solve it ?
- What's the biggest problem faced on your projects and how did you solve it?
- How do you organize your code ?
Hint 1: How do you name your folders ?
Hint 2: How do you name your files ?
- When do you optimize your code?
- Do you heard about MVC (Model View Controller) ? What is that ?
- Do you prefer to work on a team or alone?
- Do you have experience with Linux ? What about Linux Console ?
- Do you know which is the difference between a constant and a variable ?
- Result of
Answer: 3
- What value is returned from the above statement?
echo join("", array_reverse(str_split("i'm a lasagna hog")));
Answer: "goh angasal a m'i"
- What is the value of
count($array)
?
$array = array();
array_push($array, 1);
array_push($array, 2);
Answer: 2
- What is the result of the two alerts functions?
$foo = "Hello";
function alert_a() {
global $foo;
$bar = " World";
echo ($foo . $bar);
}
function alert_b() {
$bar = " World";
echo ($foo . $bar);
}
alert_a();
alert_b();
Answer:
alert_a() = Hello World
alert_b() = E_NOTICE : type 8 -- Undefined variable: foo -- at line 15 World
- Do you know ?
- How do you choose a column to be indexed?
Answer: You'd like to index columns, that appear in WHERE clause or JOIN condition.
- Are you familiar with NoSQL databases? Which one ?
Answer: for example MongoDB
- Do you know what is an ORM (Object Relational Mapping) ?
Answer: Technique to convert query results of database into a Object Oriented way.
- Why do databases treat null as a so special case? For example, why does
SELECT * FROM table WHERE field = null not match records with null field in SQL
?
Answer: The correct syntax is where is null
- Can you give me some examples of HTTP methods? And why are used commonly for?
Answer:
- GET = retrive some data
- POST = sent data to server
- PUT = update some data
- PATCH = update some data partially
- Common Server Response Codes
2.1. Describe server response code 200.
Answer: ("OK") Everything went ok. The entity-body, if any, is a representation of some resource.
2.2. Describe server response code 301.
Answer: ("Moved Permanently") Client triggered an action on the server that caused the URI of a resource to change.
2.3. Describe server response code 404.
Answer: ("Not Found") Client requested a URI that doesn't map to any resource.
2.4. Describe server response code 500
Answer: ("Internal Server Error") A problem occurred on the server side. The entity-body, if any, is a error message.