Skip to content

Glossary: PHP Basics

declare(strict_types=1)

Also written: strict_types, strict mode

A line at the top of a file that makes PHP stop with a TypeError when a wrong type is passed to a function, instead of quietly converting it.

Where the book teaches it

Related terms

type declarationTypeErrortype juggling