PHP code example of bredmor / yaro

1. Go to this page and download the library: Download bredmor/yaro library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bredmor / yaro example snippets

$php
use bredmor\Yaro\Yaro;
$yaro = new Yaro();
echo $yaro->parse("Your *markdown* text here.");
$php
$lexer = new bredmor\Yaro\Lexer\DefaultLexer();
$lexer->setToken('/Your PCRE-compat regex here/', function($match) {
    // Any closure, function name or preg_* function compatible replacement string can be used for the 2nd argument
});
$yaro = new Yaro($lexer);
echo $yaro->parse("Your custom markdown text here.");