Trying to copy linux blog locally with XAMPP – php fatal error

Problem solved. WordPress had an old version. XAMPP had PHP 8. Incompatible.
I uninstalled XAMPP and reinstalled an older version with PHP 7.4.

now it’s working fine