", $m); if ($tag_end === false) break; $tag = substr($wevia, $m, $tag_end - $m + 1); $content_start = $tag_end + 1; $end = strpos($wevia, "", $content_start); if ($end === false) break; $content = substr($wevia, $content_start, $end - $content_start); $start_line = substr_count(substr($wevia, 0, $m), "\n") + 1; $nlines = substr_count($content, "\n") + 1; $scripts[] = [ "tag_start_line" => $start_line, "tag" => substr($tag, 0, 80), "content_size" => strlen($content), "content_lines" => $nlines, ]; $pos = $end + 9; } echo json_encode($scripts, JSON_PRETTY_PRINT);