PHP 형식ter
Free online PHP Formatter. Simple JS-based formatter with proper indentation and line breaks for cleaner code.
사용법
기능
- 基于纯 JS 的简易 PHP 格式化器(无后端)
- 识别 { } 花括号缩进,加换行,去除多余空白
- 支持自定义缩进字符数(2/4/8)和缩进类型(空格/Tab)
- 不处理 PHP 复杂语法(不解析类/函数/字符串内的花括号,这是已知限制)
활용 사례
- 粘贴压缩的 PHP 代码
- 对于含字符串内花括号(e.g. SQL 嵌入)或注释内的花括号,需手动检查
- 适合日常压平一行代码,非全功能 PHP-Parser
나이nt API 사용법
This tool is pure frontend,Data is processed in the browser,never sent to a server。
manifest 中 api_url 为空,
/api/formatphp/ endpoint does not exist(返回 404)。
Agent 请读取 schema.json 理解字段,Please execute the tool logic in the browser first。
// Step 1: 读取工具 Schema GET https://clawam.com/tools/formatphp/schema.json // Step 2: 在浏览器中执行工具逻辑 // PHP 格式化 在工具页 JS 中实现