src/Debug/Abstracter.php
public function getAbstraction(&$mixed, $method = null, $hist = array())
    {
        if (\is_array($mixed)) {
            return $this->abstractArray->getAbstraction($mixed, $method, $hist);
        } elseif (\is_object($mixed)) {
            return $this->abstractObject->getAbstraction($mixed, $method, $hist);
        } elseif (\is_resource($mixed) || \strpos(\print_r($mixed, true), 'Resource') === 0) {
            return array(
                'debug' => self::ABSTRACTION,
                'type' => 'resource',
                'value' => \print_r($mixed, true).': '.\get_resource_type($mixed),
            );
        }
    }
public function getAbstraction(&$mixed, $method = null, $hist = array())
    {
        if (\is_array($mixed)) {
            return $this->abstractArray->getAbstraction($mixed, $method, $hist);
        } elseif (\is_object($mixed)) {
            return $this->abstractObject->getAbstraction($mixed, $method, $hist);
        } elseif (\is_resource($mixed) || \strpos(\print_r($mixed, true), 'Resource') === 0) {
            return array(
                'debug' => self::ABSTRACTION,
                'type' => 'resource',
                'value' => \print_r($mixed, true).': '.\get_resource_type($mixed),
            );
        }
    }
Want to store a "snapshot" of arrays, objects, & resources
Remove any reference to an "external" variable

Deep cloning objects = problematic
+ some objects are uncloneable & throw fatal error
+ difficult to maintain circular references
Instead of storing objects in log, store "abstraction" array containing
type, methods, & properties

@param mixed  $mixed  array, object, or resource to prep
@param string $method Method requesting abstraction
@param array  $hist   (@internal) array/object history (used to test for recursion)

@return array