Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Linting

Linting is the process to turn the text file that holds the source code into tokens. During this first phase, PHP applies some checks, and report anything that makes no sense.

After linting, the code is processed further before reaching the status of opcode, where it can be executed.

Linting is an option of the PHP CLI: -l.

Linting is sometimes mistaken with compile: linting is a part of a compilation. Since PHP has only this one step between the code and its execution, with eval() or the PHP CLI, linting is often considered as compiling. Reality is more complex.

Documentation

See Also