{"uid":"cap_Y2cux49wA3w65E09IoBQt","slug":"php-lint-api-f526da44","name":"PHP Lint API","description":"PHP lint: POST {code}, get the bugs back with line numbers. Deterministic static analysis — code is never executed, no AI. Catches SQL injection (request data interpolated into query strings), the removed mysql_* API, unbalanced braces, '+' string concat, = vs == in conditions, type-juggling loose comparisons, eval/extract on request data, unused variables, leftover var_dump. Understands PHP tags, heredocs, interpolation. Max 128 KB.","url":"https://api.webbersites.com/api/lint/php","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":["code"],"properties":{"code":{"type":"string","description":"PHP source to lint, max 128 KB"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"counts":{"type":"object"},"issues":{"type":"array"},"syntax":{"type":"object"},"verdict":{"type":"string"},"language":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"counts":{"info":0,"error":2,"warning":0},"issues":[{"hint":"use prepared statements with bound parameters (PDO/mysqli)","line":2,"rule":"security/sql-injection","message":"request data ($_GET/$_POST/...) interpolated directly into an SQL string","severity":"error"}],"syntax":{"ok":true,"errors":[]},"verdict":"errors","language":"php"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_b43PE3tf2WPX1ohu2prwp","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Statically analyzes PHP source code and returns bugs with line numbers, including SQL injection, deprecated APIs, syntax errors, and code quality issues.","exampleAgentPrompt":"Can you lint this PHP code for me and tell me about any bugs, SQL injection risks, or deprecated mysql_* calls — with line numbers?","exampleUseCases":null,"resultDescription":"A list of detected issues in the submitted PHP code, each with a line number and description of the problem (e.g. SQL injection via interpolated request data, use of removed mysql_* functions, unbalanced braces, string concatenation with '+', assignment in condition, type-juggling loose comparisons, eval/extract on request data, unused variables, leftover var_dump calls).","failureModes":["Code exceeds 128 KB limit — request rejected","Malformed JSON body — 400 error","Non-PHP content submitted — may return no findings or unexpected results","Network timeout on large files near the size limit"],"whenToPreferThis":"Use this endpoint when you need deterministic, rule-based static analysis of PHP code without executing it — especially for catching SQL injection risks, deprecated mysql_* API usage, syntax issues, and common PHP anti-patterns. Prefer this over AI-based code review when you need consistent, reproducible results. Best suited for CI/CD pipelines, code review automation, or pre-submission checks on PHP files up to 128 KB.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:51:27.458Z","isFirstParty":false}