php-src/ext/standard/tests/general_functions/closures_002.phpt
2008-07-17 19:29:34 +00:00

29 lines
467 B
PHP
Executable File

--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--
Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
Deprecated: register_tick_function(): Ticks is deprecated and will be removed in PHP 6 in %s on line %d
Test
%d
%d
bool(true)
%d
Done