Little helper

From Sunhill Framework Documentation

makeStdClass()

This function takes an associative array and converts it into a StdClass object. Example:

<?php

var_dump(makeStdClass(['a'=>1,'b'=>'abc']);

results in

object(stdClass)#1 (1) {
 ["a"]=>
 int 1,
 ["b"]=>
 string(3) "abc"
}

This function does the same as

(object)array('a'=>1,'b'=>'abc');