Fatal error: strict_types declaration must be the very first statement in the script
If you use P3 Profiler plugin you may get the following PHP fatal errors:
PHP Fatal error: strict_types declaration must be the very first statement in the script in .../wp-content/plugins/wp-rocket/inc/Engine/Optimization/GoogleFonts/AbstractGFOptimization.php on line 3
or
Fatal error: strict_types declaration must be the very first statement in the script in .../wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/Container.php on line 1
The errors occur when P3 Profiler plugin is running a scan process.
Solution:
Deactivate the P3 Profiler plugin to resolve the error.