Threaded::merge - 操作
用法
public boolean Threaded::merge( mixed $from [, bool $overwrite ] )
Threaded::merge 函数可以将数据合并到当前对象中。
Threaded::merge 函数可以返回成功的布尔值指示。
示例
<?php
$array = [];
while(count($array) < 10)
$array[] = count($array);
$stdClass = new stdClass();
$stdClass->foo = "foo";
$stdClass->bar = "bar";
$stdClass->baz = "baz";
$safe = new Threaded();
$safe->merge($array);
$safe->foo = "bar";
$safe->merge($stdClass, false);
var_dump($safe);
?>
相关用法
- PHP Threaded::synchronized()用法及代码示例
- PHP Threaded::notify()用法及代码示例
- PHP Threaded::isWaiting()用法及代码示例
- PHP Threaded::isRunning()用法及代码示例
- PHP Threaded::notifyOne()用法及代码示例
- PHP Thread::isJoined()用法及代码示例
注:本文由纯净天空筛选整理自 PHP - Threaded::merge() Function。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。