php-src/ext/standard/tests/general_functions/closures_002.phpt

29 lines
467 B
Plaintext
Raw Normal View History

2008-07-17 09:53:42 +00:00
--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--
2008-07-17 19:29:34 +00:00
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
2008-07-17 09:53:42 +00:00
Test
%d
%d
bool(true)
%d
Done