function walk(&$a) { if (empty(self::$tag)) { self::$tag = (object) array(); self::$token = md5(mt_rand() . spl_object_hash(self::$tag), true); self::$tag = array(self::$token => self::$tag); } $this->arrayType = $this->counter = $this->depth = 0; $this->walkRef($a); }
function walk(&$a) { if (empty(self::$tag)) { self::$tag = (object) array(); self::$token = md5(mt_rand() . spl_object_hash(self::$tag), true); self::$tag = array(self::$token => self::$tag); } $this->arrayType = $this->counter = $this->depth = 0; $this->prevErrorHandler = set_error_handler(array($this, 'handleError')); try { $this->walkRef($a); } catch (\Exception $e) { } restore_error_handler(); $this->prevErrorHandler = null; $this->refPool = array(); $this->valPool = $this->objPool = array(); $this->arrayPool = $this->refMap = array(); if (isset($e)) { throw $e; } }