PHP Ticks and Declare construct


PHP Ticks and Declare construct

function myfunc()
{
    print "I will pass!";
}
register_tick_function("myfunc");
declare(ticks=1)
{
}

我写了下面的代码,以理解"ticks"的主题与"declare"语句在php中使用,不知道为什么输出:"我过去!"我不去!我过去!"我看过declare构造的手册部分,但我发现它的解释不完整http://php.net/manual/en/control-structures.declare.php

希望这个链接能帮助大家更好地理解蜱虫。

执行上述语句后,我得到的结果是"I will pass! "我过去!"