[Solved] Get php array from object


issues solved with the answer of @drewish

Source: ReflectionClass

Code:

 function accessProtected($obj, $prop) {
  $reflection = new ReflectionClass($obj);
  $property = $reflection->getProperty($prop);
  $property->setAccessible(true);
  return $property->getValue($obj);
}

solved Get php array from object