1. Go to this page and download the library: Download nabeghe/risma 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/ */
nabeghe / risma example snippets
use Nabeghe\Risma\Risma;
// The string IS the program:
// Combines variables, pipelines, built-in conditionals, and Direct Function Execution (@)
$template = 'Hi {user.trim.title}! You have {unread} unread {unread.plural("message", "messages")}. '
. 'Server time: {@date("H:i")} | Status: {@phpversion.truncate(3, "").if_gte("8.0", "Modern 🚀 (%s)", "Legacy ⚠️ (%s)")}';
echo Risma::quick($template, [
'user' => ' sarah connor ',
'unread' => 5,
]);
// Output: Hi Sarah Connor! You have 5 unread messages. Server time: 14:30 | Status: Modern 🚀 (8.4)