**TEST PHP DEVELOPER (30 minutes)

1. The value of the variable input is a string 1,2,3,4,5,6,7. How would you get the sum of  the integers contained inside input?
2. I have 3 field on the front end menu.

a. Email

b. Phone

c. Name

Please create sample validation code for three fields above.

3. Suppose that you have to implement a class named Dragonball. This class must have an  attribute named ballCount (which starts from 0) and a method iFoundaBall.  When iFoundaBall is called, ballCount is increased by one. If the value of ballCount is  equal to seven, then the message You can ask your wish is printed, and ballCount is  reset to 0. How would you implement this class?
4. What are the 3 scope levels available in PHP and how would you define them? 
5. How does one prevent the following Warning ‘Warning: Cannot modify header  information – headers already sent’ and why does it occur in the first place? 
6. What does the following code output?

$i = 016;

echo $i / 2;

7. What does MVC stand for and what does each component do?
8. O T T F F S S E N …

Which is the next letter ?

9. There is fisherman and hunter.

They both say true except for the days when they always lie:

The fisherman lies on Monday , Tuesday, and Wednesday. The hunter lies on Thursday,  Friday, and Saturday.

Today they say, that they are both lying yesterday.

Which day is today ?

10. There is broken window in house.

Then I asked who broke the window :

Gregory : I was not !

April : I didn’t do it

August: April was.

June : August says the truth

(Two of them said the truth and two them said lie)

I ask them again :

Gregory : It was June

April : August didn’t do it

August : April didn’t do it!

June : Gregory was lying.

Who broke the window ? Please explain the logic.

*