Description
Syntax highlighting powered by TextMate grammars in PHP.
1. Install Phiki
composer require phiki/phiki:^2.0
2. Create a new Phiki instance
use Phiki\Phiki; $phiki = new Phiki();
3. Highlight your code
use Phiki\Grammar\Grammar;use Phiki\Theme\Theme; $code = file_get_contents('path/to/your/code.php');$highlighted = $phiki->codeToHtml($code, Grammar::Php, Theme::GithubLight); echo $highlighted;
Recent Courses on Laravel Daily
[NEW] Practical Laravel Security: Packages, Secrets, Supply-Chain Attacks
7 lessons
43 min read
Laravel 13 Eloquent: Expert Level
41 lessons
1 h 34 min
How to Structure Laravel 13 Projects
16 lessons
1 h 32 min read