It seems like there is an issue with the php version you are using, it might be the issue that your Moodle version is not compatible with the Php version.
i hope you may get some help from the below link :-
https://moodle.org/mod/forum/discuss.php?d=342685
Regards,
vaibhav Sharma