Why PHP Parse unmachet after update to PHP8?

I’m having the same exact issue. Same message in PHP 8 but not in PHP 7.4. The code is properly indented, ect. and can’t find a single issue.

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