That custom error handler was never set, because the code you see above never even executed. The reason was, like said many times already, a miss-typed opening PHP tag, which tells PHP where PHP code is. If that tag is missing or miss-typed the code is just returned to the browser like HTML.
The point is that no server configuration can save you from an error like this.
The point is that no server configuration can save you from an error like this.