Add missing codes that can be caught by register_shutdown_function
#6424 - adding compile/parse handled error codes test
#6424 - adding missing test property and docblock
#6424 - refactored logic of the logger to remove leaking scoped variables
Merge branch 'hotfix/#6424-adding-missing-register_shutdown_function-handled-codes' into develop

Close #6424