danack / looping-exec
一个用于循环运行代码的函数。
0.3.0
2021-03-03 17:59 UTC
Requires
- ext-pcntl: *
Requires (Dev)
- danack/coding-standard: 0.2.0
- phpunit/phpunit: 9.0.1
- slevomat/coding-standard: ^4.8.4
- squizlabs/php_codesniffer: ^3.3.1
- yoast/yoastcs: 1.0
This package is auto-updated.
Last update: 2024-08-29 05:16:11 UTC
README
一个函数库,允许在返回之前重复运行可调用对象一定的时间。
请注意,参数可能有所变动。
示例
<?php require __DIR__ . "/vendor/autoload.php"; use function LoopingExec\continuallyExecuteCallable; $fn = function () { static $count = 0; echo "Hello world: $count\n"; $count += 1; }; continuallyExecuteCallable( $fn, 5, 1000, 0 ); // output is: // Hello world: 0 // Hello world: 1 // Hello world: 2 // Hello world: 3 // Hello world: 4