mirror of
https://github.com/php/php-src.git
synced 2024-10-21 16:33:44 +00:00
29 lines
467 B
PHP
Executable File
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
|