File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / general_functions / closures_002.phpt
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:04 2012 UTC (12 years, 5 months ago) by misho
CVS tags: MAIN, HEAD
Initial revision

--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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>