How storyofalgo/code-syntax-highlighter-php works
This is a small PHP syntax-highlighting demo. A browser request runs index.php, which asks the Highlighter to read and render two source files as numbered, syntax-colored HTML; keywords.php supplies extension-specific keyword lists, and style.css styles the result. The excerpts show the entry-point and keyword lookup relationships, but do not show style.css contents or how it is served, so that link is left unasserted.
Main entry points: index.php Demo page · highlighter.class.php Syntax highlighter · keywords.php Keyword lists
Components 5
Highlight rendering
- Demo page
index.php - Syntax highlighter
highlighter.class.php - Highlight styles
style.css
Language definitions
- Keyword lists
keywords.php
Other components
- Browser visitor
Connections 3
- Browser visitor → Demo page: requests page
index.php - Demo page → Syntax highlighter: renders snippets
index.php - Syntax highlighter → Keyword lists: loads lists
highlighter.class.php