PHP·98 questionsWhat are anonymous classes?SaveUpdated: 2026-08-31Answer•$obj = new class { }.•PHP 7.0+.•For one-time implementations.•Can inherit and implement interfaces.•Used in tests, mocks.Ask AI to clarifyWas this answer helpful?HelpfulNot helpfulSuggest an improvement