# `CompileError`

> Section in “New and Extended Functionality › Error Handling” of the book [PHP 7 Explained](https://php7explained.com/) by Sebastian Bergmann and Stefan Priebsch, published by thePHP.cc. The book covers PHP 7.0 to 7.4 and was last updated in November 2020. HTML version: <https://php7explained.com/new-and-extended-functionality/error-handling/compileerror/>

In PHP 7.3, a new `CompileError` type has been introduced. It extends `Error` and is now the parent type of `ParseError`. A few compilation errors now throw a `CompileError` instead of generating a fatal error. This currently only affects compilation errors that may occur during `token_get_all()` in `TOKEN_PARSE` mode. More compilation errors may be converted from a fatal error to `CompileError` in the future.

---

Previous: [Method Call on Non-Object](https://php7explained.com/new-and-extended-functionality/error-handling/method-call-on-non-object/index.html.md) | Next: [Errors in Extensions](https://php7explained.com/new-and-extended-functionality/error-handling/errors-in-extensions/index.html.md)
