Hi @rehansaleem,
We had this issue too but moving to php 7.2 fixed it. Which version of php 7.2.x are you on that you still get the error?
See this:
You might want to confirm your PHP version a phpinfo() file in the root if you can’t access the server details in the settings area of Mautic. (Also you may need to disable htaccess to load the phpinfo php file in the root as the htaccess routes all requests to index)
Also if it is the right version make don’t assume its the same error causing the 500 error…make sure the error did not change to a memory error.