Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 869 Bytes

File metadata and controls

24 lines (18 loc) · 869 Bytes

Functional PHP

Import functions

Whenever you want to work with Functional PHP and not reference the fully qualified name, add use Functional as F; on top of your PHP file or use use function Functional\function_name. The latter is used in the documentation is the preferred way starting with PHP 5.6.

Example

use function Functional\map;

map(range(0, 100), function($v) {return $v + 1;});