> */ public function getUsers(UserRepository $repository): JsonResult { $users = $repository->findAll(); $count = count($users); return new JsonResult([ 'users' => $users, 'count' => $count, 'message' => "Found {$count} users" ]); } } PHP; $highlighter = new SyntaxHighlighter(); // Test HTML output echo "=== HTML Output ===\n"; $html = $highlighter->highlightWithCss($phpCode, [ 'theme' => 'dark', 'lineNumbers' => true ]); echo $html . "\n\n"; // Test console output echo "=== Console Output ===\n"; $console = $highlighter->highlight($phpCode, 'console', [ 'colorize' => true, 'lineNumbers' => true ]); echo $console . "\n"; // Test tokenization echo "=== Tokenization Test ===\n"; $tokens = $highlighter->tokenize($phpCode); echo "Total tokens: " . $tokens->count() . "\n"; // Show first few tokens $first5 = $tokens->slice(0, 5); foreach ($first5 as $token) { echo sprintf( "Line %d: %s = '%s'\n", $token->line, $token->type->value, trim($token->value) ); }