2079 11

Web Technology II20795 marksAnonymous classes

Describe an anonymous class using suitable example.

Describe an anonymous class using suitable example. [5]

An anonymous class is a class written directly at the place where its single object is needed, with no name attached to it. PHP creates the class and the object in one expression, new class { ... }, a form available since PHP 7. Before that the only way to supply behaviour inline was a closure, w...

Up nextWrite a PHP program for illustrating the starting and ending of session.