Function : tostdClass

This function converts an array to a stdClass object in which all values are maintained.

Syntax
  tostdClass($array)
  
  $array: array value expected to be converted
   
                  
Sample 1
  $object = tostdClass(['gender' => 'male']);

  vdump($object->gender); //male
                  
It should be noted that when values which are not of array data type are supplied an error is thrown. This function is depedent upon the array_object() function