str_repeat(' ', intdiv(strlen($m[0]), 2)), $encoded); file_put_contents($path, $encoded."\n"); $saved = json_decode(file_get_contents($path), true, 512, JSON_THROW_ON_ERROR); if ($saved !== $data) { throw new RuntimeException('Saved record differs.'); } echo "Linha 04 passou; restantes linhas e estados agregados preservados.\n";