Sr. PHP Programmer Question:
Download Questions PDF

How will you create objects in PHP?

Answer:

Once you defined your class, then you can create as many objects as you like of that class type. Following is an example of how to create object using new operator.

$physics = new Books;
$maths = new Books;
$chemistry = new Books;

Download Senior PHP Programmer Interview Questions And Answers PDF

Previous QuestionNext Question
How to create an array of a group of items inside an HTML form?How to strip whitespace (or other characters) from the beginning and end of a string?