Skip to content

Glossary: PHP Basics

throw

Also written: throw new

The keyword that raises an exception, stopping the current code. The caller decides what to do, as when `Order` rejects a quantity of 25.

Where the book teaches it

Related terms

exceptiontrycatch