adding objects with + equal to array process

From: Date: Wed, 05 Jul 2000 10:12:12 +0000
Subject: adding objects with + equal to array process
Groups: php.dev 
Request: Send a blank email to php-dev+get-23545@lists.php.net to get a copy of this message
Hi there, it´s possible to glue two arrays with the operator "+", eg. $array1=array('arr','arr2'); $array2=array('arr3'); $array3=$array1+$array2; // $array3==array('arr','arr2','arr3'); I think that would be useful with objects too. $obj->property='a'; $obj2->property2='b'; $resobj=$obj+$obj2; $resobj should then contain these properties $obj->property=='a' && $obj->property2=='b'; It´s very annoying to do this by hand and it shouldn´t be very performant operating on larger objects. regards

« previous php.dev (#23545) next »