PHP developer test task

Hello, 

Here solution for 2 tasks from 3. 

Last part will be made today and I send you link to demonstrate how it works.