• PHP Video Tutorials

PHP - Threaded::merge() Function



Threaded::merge - Manipulation

Syntax

public boolean Threaded::merge( mixed $from [, bool $overwrite ] )

Threaded::merge function can merge the data into a current object.

Threaded::merge function can return a boolean indication of success.

Example

<?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_function_reference.htm
Advertisements