function ErrorHandler::parseAnonymousClass
Parse the error message by removing the anonymous class notation and using the parent class instead if possible.
2 calls to ErrorHandler::parseAnonymousClass()
- ErrorHandler::handleError in vendor/
symfony/ error-handler/ ErrorHandler.php - Handles errors by filtering then logging them according to the configured bit fields.
- ErrorHandler::handleException in vendor/
symfony/ error-handler/ ErrorHandler.php - Handles an exception by logging then forwarding it to another handler.
File
-
vendor/
symfony/ error-handler/ ErrorHandler.php, line 743
Class
- ErrorHandler
- A generic ErrorHandler for the PHP engine.
Namespace
Symfony\Component\ErrorHandlerCode
private function parseAnonymousClass(string $message) : string {
return preg_replace_callback('/[a-zA-Z_\\x7f-\\xff][\\\\a-zA-Z0-9_\\x7f-\\xff]*+@anonymous\\x00.*?\\.php(?:0x?|:[0-9]++\\$)?[0-9a-fA-F]++/', static fn($m) => class_exists($m[0], false) ? ((get_parent_class($m[0]) ?: key(class_implements($m[0]))) ?: 'class') . '@anonymous' : $m[0], $message);
}