]> _ Git - cubist_util.git/commitdiff
wip #5399 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 18 Aug 2022 12:23:22 +0000 (14:23 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 18 Aug 2022 12:23:22 +0000 (14:23 +0200)
src/ObjectUtil.php
src/PHP.php

index 4ea4d825a83a84cff9169306f39f39649b4b63cc..c3daa30817bb7a7d5b90501b59f2f2cd68ee9202 100644 (file)
@@ -50,5 +50,13 @@ class ObjectUtil
         return $res;
     }
 
+    public static function merge() {
+        $res = new \stdClass();
+        $args=func_get_args();
+        foreach ($args as $v) {
+            $res = (object) array_merge((array) $res, (array) $v);
+        }
+        return $res;
+    }
 
 }
index bcbc8f34755b652be90ebb4a1581b18f26f8b9f4..3a86f4216b95786d736455781571b660569209b9 100644 (file)
@@ -76,4 +76,5 @@ class PHP
         $export = implode(PHP_EOL, array_filter(["["] + $array));
         if ($return) return $export; else echo $export;
     }
+
 }