diff options
Diffstat (limited to 'ext/standard/tests/general_functions/closures_002.phpt')
-rw-r--r-- | ext/standard/tests/general_functions/closures_002.phpt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ext/standard/tests/general_functions/closures_002.phpt b/ext/standard/tests/general_functions/closures_002.phpt new file mode 100644 index 0000000..6df389b --- /dev/null +++ b/ext/standard/tests/general_functions/closures_002.phpt @@ -0,0 +1,25 @@ +--TEST-- +register_tick_function() & closure +--FILE-- +<?php + +declare (ticks = 1); + +$i = 0; +register_tick_function(function () use (&$i) { $i++; }); + +echo "Test\n"; +echo "$i\n"; +echo "$i\n"; +var_dump ($i != 0); +echo "$i\n"; +echo "Done\n"; + +?> +--EXPECTF-- +Test +%d +%d +bool(true) +%d +Done |