private function getVarId($var)
    {
        if (is_object($var)) {
            $hash = spl_object_hash($var);
        } elseif (is_resource($var)) {
            $hash = intval($var) . '#resource#' . get_resource_type($var);
        } elseif (is_array($var) && $this->checkArrayRecursion($var)) {
            $hash = $this->getArrayId($var);
        }

        if (isset($hash)) {
            if (isset($this->hash[$hash])) {
                return $this->hash[$hash];
            }

            return $this->hash[$hash] = self::uid();
        }

        return null;
    }
private function getVarId($var)
    {
        if (is_object($var)) {
            $hash = spl_object_hash($var);
        } elseif (is_resource($var)) {
            $hash = intval($var) . '#resource#' . get_resource_type($var);
        } elseif (is_array($var) && $this->checkArrayRecursion($var)) {
            $hash = $this->getArrayId($var);
        }

        if (isset($hash)) {
            if (isset($this->hash[$hash])) {
                return $this->hash[$hash];
            }

            return $this->hash[$hash] = self::uid();
        }

        return null;
    }
private function getVarId ( $ var ) { if ( is_object ( $ var ) ) { $ hash = spl_object_hash ( $ var ) ; } elseif ( is_resource ( $ var ) ) { $ hash = intval ( $ var ) . '#resource#' . get_resource_type ( $ var ) ; } elseif ( is_array ( $ var ) && $ this -> checkArrayRecursion ( $ var ) ) { $ hash = $ this -> getArrayId ( $ var ) ; } if ( isset ( $ hash ) ) { if ( isset ( $ this -> hash [ $ hash ] ) ) { return $ this -> hash [ $ hash ] ; } return $ this -> hash [ $ hash ] = self :: uid ( ) ; } return null ; }
Return id for given object|array|resource

@param mixed $var

@return int|null
Return id for given object|array|resource