Write the PHP expression that checks whether $logger implements the Psr\Log\LoggerInterface.
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 subscribe to take "Write an instanceof Check Against an Interface". Earn 90 XP and track your internship progress.
Already have an account? Sign in