(PECL pthreads >= 2.0.0)
Threaded::count — 操作
返回對象的屬性數(shù)量
此函數(shù)沒有參數(shù)。
示例 #1 計算對象中的屬性數(shù)量
<?php$safe = new Threaded();while (count($safe) < 10) { $safe[] = count($safe);}var_dump(count($safe));?>
以上例程會輸出:
int(10)