Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

Online PHP Subjective Knowledge Test

Topics Covered

  • Looping
  • Array
  • Regular Expression
  • Inheritance
  • File Handling and String
  • Custom Error Handling
  • Operator
  • Custom Exception Handling
  • Sorting
  • Trait

Useful for hiring

  • PHP Developer
  • PHP Designer
  • PHP Specialist

Start hiring job-fit candidates using this assessment


"Interview Mocha's assessments eliminated reliance on resumes and reduced our time to hire by half. Now we spend time only on relevant candidates and take data-driven hiring decisions."

George Nichkov, Gett,
Global Analytics Team Lead

Below is an Object Oriented PHP program, few lines in the program are missing (//write your code here).
You need to finish the lines to get the output as 'I Like PHP.'

Sample Program:

class Base {
    public function sayLike() {
        echo 'I Like ';

trait SayLanguage {
    public function sayLike() {
        echo 'PHP.';

class ILikePHP extends Base {

$obj = ;



Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates