The extension works automatically on all .php files:
-
PHP Tag Highlighting
- Open any
.phpfile - Tags
<?php,<?, and?>are automatically highlighted in goldenrod bold
- Open any
-
Bracket Matching
- Position your cursor on any
(,),{,},[, or] - The matching bracket is highlighted with a goldenrod background
- Position your cursor on any
-
Control Structure Highlighting
- Place your cursor on any PHP control keyword:
if,elseif,else,endifforeach,endforeachfor,endforwhile,endwhileswitch,endswitch
- The entire chain is highlighted with a lime-yellow background
- Place your cursor on any PHP control keyword:
-
Quote Matching
- Click on a
"or'quote - The matching opening/closing quote is highlighted with a light blue background
- Click on a
-
Syntax Error Detection
- Red squiggles appear automatically for:
- Missing semicolons at end of statements
- Unbalanced brackets/braces
- Variables without
$prefix
- Hover over the red squiggle to see the error message
- Red squiggles appear automatically for:
| Element | Background Color | Text Color |
|---|---|---|
| PHP Tags | - | Goldenrod (bold) |
| Brackets | Goldenrod dark | Blue |
| Control Structures | Lime-yellow | Blue |
| Quotes | Light blue | - |
| Syntax Errors | - | Red (squiggle) |
The extension is optimized for large files:
- Syntax checks run only 500ms after you stop typing
- No impact on editor responsiveness
Works with both PHP syntaxes:
// Standard syntax
if ($condition) {
echo "test";
}
// Alternative syntax
if ($condition):
echo "test";
endif;- Restart Visual Studio
- Verify the file has
.phpextension - Check that the file is recognized as PHP in the bottom status bar
- The extension automatically adds a 500ms delay before checking syntax
- If you experience slowness with very large files (>500KB), consider splitting them
-
Report bugs: https://github.com/OskarCosimo/My-PHP-Syntax-Highlighter/issues
-
Feature requests: https://github.com/OskarCosimo/My-PHP-Syntax-Highlighter/discussions
-
Developers official blog: https://blog.myetv.tv/2025/11/21/my-php-syntax-highlighter-for-visual-studio/
You can find it here: https://marketplace.visualstudio.com/items?itemName=MYETV.mpsh
Thank you for using My PHP Syntax Highlighter! 💙