' !== \strtolower(\substr($var, 0, 15))) { return $v; } try { $html = HTMLDocument::createFromString($var, LIBXML_NOERROR); } catch (DOMException $e) { // @codeCoverageIgnore return $v; // @codeCoverageIgnore } $c = $v->getContext(); $base = new BaseContext('childNodes'); $base->depth = $c->getDepth(); if (null !== ($ap = $c->getAccessPath())) { $base->access_path = '\\Dom\\HTMLDocument::createFromString('.$ap.')->childNodes'; } $out = $this->getParser()->parse($html->childNodes, $base); $iter = $out->getRepresentation('iterator'); if ($out->flags & AbstractValue::FLAG_DEPTH_LIMIT) { $out->flags |= AbstractValue::FLAG_GENERATED; $v->addRepresentation(new ValueRepresentation('HTML', $out), 0); } elseif ($iter instanceof ContainerRepresentation) { $v->addRepresentation(new ContainerRepresentation('HTML', $iter->getContents()), 0); } return $v; } }