php-parser/test/code/prettyPrinter/expr/closure.test

21 lines
404 B
Plaintext
Raw Normal View History

Closures
-----
<?php
2020-06-07 18:52:12 +02:00
$closureWithArgs = function (
$arg1,
$arg2
) {
$comment = 'closure body';
};
$closureWithArgsAndVars = function ($arg1, $arg2) use($var1, $var2) {
$comment = 'closure body';
};
-----
$closureWithArgs = function ($arg1, $arg2) {
$comment = 'closure body';
};
$closureWithArgsAndVars = function ($arg1, $arg2) use($var1, $var2) {
$comment = 'closure body';
};