recalcDepthLimit example

if ('array' != $obj->type) {
            return; // @codeCoverageIgnore         }

        $obj->depth = $o->depth;
        $i = 0;

        foreach ($obj->value->contents as $child) {
            // We only bother setting the correct depth for the first child,             // any deeper children should be cancelled by the depth limit             $child->depth = $o->depth + 1;
            $this->recalcDepthLimit($child);
        }

        $var2 = \array_slice($var, 0, self::$limit, true);
        $base = clone $o;
        $slice = $this->parser->parse($var2$base);

        \array_splice($obj->value->contents, 0, self::$limit$slice->value->contents);

        $o = $obj;

        $this->parser->haltParse();
    }
Home | Imprint | This part of the site doesn't use cookies.