Skip to content

Glossary: PHP Basics

closure

Also written: closures, anonymous function, anonymous functions

An anonymous function: a function with no name that can be stored in a variable or passed to another function like a value, as in `$withShipping = function (...) {...};`.

Where the book teaches it

Related terms

arrow functionarray_map()