Write the PHP expression that checks whether $logger implements the Psr\Log\LoggerInterface.
Scenario
You want to conditionally call a logging method only if the passed-in object actually satisfies the expected interface.
Ready to try it?
Create a free account and try "Write an instanceof Check Against an Interface" free for 7 days, no card required. Earn 90 XP and track your internship progress.