Skip to content

Closure

PHP closure assigned to name

Flowchart (ISO 5807)

StartInput priceReturn price·1.2EndFigure 1 — applyTax

Source code

PHP
$applyTax = function ($price) {
    return $price * 1.2;
};

The editor opens with this code — change it and the chart redraws.

Language
PHP
Constructs
closure assigned to name
Topic
Lambdas
Formats
Word, Visio, draw.io, PDF, SVG

Related examples