markdown and php code

whats wrong with this code, which is not being highlighted properly?

<?php echo yii\helpers\Markdown::process("```php\n<?php echo date('Y-m-d'); ?>\n```"); ?>

markdown has no code highlighting integrated by default.

ok, I use your ApiMarkdown code for this

or is there a better solution?


If you’re happy for it to be done client side, you could use a JS library like Prism.

I can recommend

there is an extension: