phpstudy linux web面板(docker) 十一假期后上线,敬请期待

register_tick_function

register_tick_function

(PHP 4 >= 4.0.3, PHP 5)

register_tick_functionRegister a function for execution on each tick

说明

bool register_tick_function ( callback $function [, mixed $arg [, mixed $... ]] )

Registers the given function to be executed when a tick is called.

参数

function

The function name as a string, or an array consisting of an object and a method.

arg

...

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE.

范例

Example #1 register_tick_function() example

<?php
declare(ticks=1);

// using a function as the callback
register_tick_function('my_function'true);

// using an object->method
$object = new my_class();
register_tick_function(array(&$object'my_method'), true);
?>

更新日志

版本 说明
5.3.0 Ticks are now supported on threaded web server modules.

注释

Warning

register_tick_function() should not be used with threaded web server modules with PHP 5.2 or lower.

参见


  • call_user_func
  • call_user_func_array
  • create_function
  • forward_static_call
  • forward_static_call_array
  • function_exists
  • func_get_arg
  • func_num_args
  • get_defined_functions
  • register_shutdown_function
  • register_tick_function
  • unregister_tick_function
  • PHP MySQL HTML CSS JavaScript MSSQL AJAX .NET JSP Linux Mac ASP 服务器 SQL jQuery C# C++ java Android IOS oracle MongoDB SQLite wamp 交通频道

    无数据提示还没有评论,楼主喊你快去抢前排~~~我要评论
    微信扫码登陆

    打开 微信
    扫一扫登录