How to use
- Enter your PHP code.
- Click "Check".
- The result shows whether parentheses, braces, and strings are matched.
🎯 Use Cases
- Catch mismatched braces after writing a long function
- Find unclosed string literals
- Sanity-check code structure before pasting it in
Example
Input
<?php
function greet($name) {
if ($name) {
echo "Hello, $name";
}Output
• 2번째 줄: '{' 가 닫히지 않았습니다The function's opening brace is never closed, so the checker flags that the '{' on line 2 is unclosed (the message text is Korean, meaning "line 2: '{' is not closed"). When everything matches, it shows "✅ All parentheses and strings are matched" instead.
PHP string notation specifics
In PHP, the quote type decides whether variables expand. This tool checks bracket (){}[] balance and string termination.
| Notation | Behavior |
|---|---|
Single quote ' | Literal string — no variable expansion, faster |
Double quote " | Variables expand inside, e.g. "text $var" |
| Heredoc/nowdoc | <<<EOT multi-line strings — nowdoc without expansion |
| Variables | Start with $ — only expanded inside double quotes |
FAQ
- Does it catch every syntax error like a real PHP parser?
- No. This is a practical checker focused on matching parentheses and strings rather than a full PHP parser. For accurate syntax validation, check with a real PHP environment (php -l).
- What happens if there's no '
- You'll see a warning, but it's fine to ignore if you're only checking a code fragment.
- Is the code I enter sent to a server?
- No. It's checked entirely in your browser.
- Is this like php -l?
- No — it is a lightweight balance checker, not a parser. Use php -l for an exact syntax check.
- Does PHP mixed with HTML work?
- Balance is counted over the whole text, including the HTML outside PHP tags — treat results as a reference.
More Coding Tools
📘
JSON Formatter
Prettify, validate & minify JSON
🗓️
Timestamp Converter
Convert Unix timestamp ↔ date
🧩
JSON String Encoder
Convert text ↔ JSON string literal
✨
JS/CSS Formatter
Indent & tidy JS/CSS code
✂️
JS/CSS Minifier
Strip comments & whitespace
🧽
HTML Formatter
Indent HTML by tag structure
🧹
XML Formatter
Indent XML by tag structure
🗃️
SQL Formatter
Break SQL into clauses & indent
🔣
HTML Entity Encoder
Convert special chars ↔ HTML entities
📊
Excel to HTML Table
Convert spreadsheet data to HTML TABLE
⛓️
Link Extractor
Extract href/src links from HTML
🎨
Color Picker
Get HEX, RGB & HSL color codes
🗄️
MySQL Syntax Checker
Check bracket/quote pairing (practical checker)
🔍
HTML5 Validator
Check tag pairing, duplicate id, missing alt
✍️
Online HTML Editor
Write & edit HTML visually