2082 6

Web Technology II20825 marksAnonymous classes

What is anonymous class? Write a program to demonstrate the use of anonymous classes.

What is anonymous class? Write a program to demonstrate the use of anonymous classes. [5]

An anonymous class is a class that is defined and instantiated in a single expression and is never given a name. PHP has supported them since version 7, written as new class { ... }. The value of the expression is an object, so the definition and the object creation happen together, which suits a...

Up nextWhat is HTTP authentication? How is it done?