Skip to content

Glossary: PHP Basics

array_filter()

Also written: array_filter

A function that keeps only the values of an array for which a given function returns true, keeping the keys. Its array comes first, then the function.

Where the book teaches it

Related terms

array_map()arrow functionclosure