Can't use function return value in write context in ... civicrm.php on line 342 (5.8.1, WordPress)
It sounds like you may be using an unsupported PHP version.  CiviCRM 5.8.1 requires PHP 5.6 or higher.  

If this solves your problem, please mark it solved; if not, please edit your question to indicate your PHP version?