Skip to content
Phiki
Documentation/3-step intro

3-step intro

A quick guide to get you started with Phiki.

Install Phiki

composer require phiki/phiki:^2.0

Create a new Phiki instance

use Phiki\Phiki;

$phiki = new Phiki();

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;