1--TEST-- 2register_tick_function() & closure 3--FILE-- 4<?php 5 6declare (ticks = 1); 7 8$i = 0; 9register_tick_function(function () use (&$i) { $i++; }); 10 11echo "Test\n"; 12echo "$i\n"; 13echo "$i\n"; 14var_dump ($i != 0); 15echo "$i\n"; 16echo "Done\n"; 17 18?> 19--EXPECTF-- 20Test 21%d 22%d 23bool(true) 24%d 25Done 26