Is there a way to catch an Exception without having to create a variable?

Starting with PHP 8, it is possible to use a non-capturing catch. This is the relevant RFC, which was voted favourably 48-1. Now it will be possible to do something like this: try { readFile($file); } catch (FileDoesNotExist) { echo “File does not exist”; } catch (UnauthorizedAccess) { echo “User does not have the appropriate … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)