Closures

You can nest them

<?php
$getClosure = function($v) {
    return function() use($v) {
        echo "Hello World: $v!\n";
    };
};

$closure = $getClosure(2);
$closure();
Output
Hello World: 2!