<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Hadi Akbarzadeh</title>
    <description>The latest articles on Forem by Hadi Akbarzadeh (@nabeghe).</description>
    <link>https://forem.com/nabeghe</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F876287%2F3cfa1248-51da-4900-a643-47adbe8d5f8e.jpeg</url>
      <title>Forem: Hadi Akbarzadeh</title>
      <link>https://forem.com/nabeghe</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nabeghe"/>
    <language>en</language>
    <item>
      <title>Unlock Dynamic String Processing in PHP with Risma</title>
      <dc:creator>Hadi Akbarzadeh</dc:creator>
      <pubDate>Tue, 24 Feb 2026 05:28:50 +0000</pubDate>
      <link>https://forem.com/nabeghe/unlock-dynamic-string-processing-in-php-with-risma-5fim</link>
      <guid>https://forem.com/nabeghe/unlock-dynamic-string-processing-in-php-with-risma-5fim</guid>
      <description>&lt;p&gt;If you've ever wanted a lightweight, flexible way to handle dynamic content in PHP, Risma might be exactly what you need. Risma is a high-performance string processing and template engine that supports intuitive function chaining.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Risma?
&lt;/h2&gt;

&lt;p&gt;Risma shines when you need to transform raw text into dynamic content. It's perfect for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Template engines&lt;/li&gt;
&lt;li&gt;Dynamic notifications&lt;/li&gt;
&lt;li&gt;Content sanitization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Its key features include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Variable Injection: Replace placeholders with dynamic data.&lt;/li&gt;
&lt;li&gt;Function Chaining: Pipe data through multiple functions effortlessly.&lt;/li&gt;
&lt;li&gt;Nested Placeholders: Resolve placeholders recursively.&lt;/li&gt;
&lt;li&gt;Global &amp;amp; Custom Functions: Use PHP functions or your own.&lt;/li&gt;
&lt;li&gt;Class Integration: Map class methods directly to your pipeline.&lt;/li&gt;
&lt;li&gt;Clean Syntax: {var.func1.func2} style, intuitive and readable.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;Install via Composer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require nabeghe/risma
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Basic usage:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Nabeghe\Risma\Risma&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$risma&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Risma&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$risma&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Hello &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;!"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'Hadi'&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; 
&lt;span class="c1"&gt;// Output: Hello Hadi!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Function Chaining Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Welcome, &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nv"&gt;user.strtoupper&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;!"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$risma&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'user'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'alice'&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="c1"&gt;// Output: Welcome, ALICE!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Direct Function Calls
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Current Year: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nv"&gt;@date('Y')&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$risma&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;
&lt;span class="c1"&gt;// Output: Current Year: 2026&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Risma lets you write PHP-driven templates without the heavy boilerplate, keeping your code clean, dynamic, and readable.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://github.com/nabeghe/risma-php" rel="noopener noreferrer"&gt;Github &amp;amp; Docs&lt;/a&gt;&lt;/p&gt;

</description>
      <category>php</category>
      <category>backend</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Cronark: Lightweight Cron-Based Job Scheduling for PHP</title>
      <dc:creator>Hadi Akbarzadeh</dc:creator>
      <pubDate>Tue, 24 Feb 2026 05:16:41 +0000</pubDate>
      <link>https://forem.com/nabeghe/cronark-lightweight-cron-based-job-scheduling-for-php-1i9j</link>
      <guid>https://forem.com/nabeghe/cronark-lightweight-cron-based-job-scheduling-for-php-1i9j</guid>
      <description>&lt;p&gt;If you need background jobs in PHP but don’t want to deal with Redis, RabbitMQ, or heavy infrastructure, Cronark might be exactly what you’re looking for.&lt;/p&gt;

&lt;p&gt;It’s a minimal, cron-driven job scheduler that works with plain PHP (8.1+) and your system’s cron; no external services required.&lt;/p&gt;

&lt;h2&gt;
  
  
  🤔 Why Use It?
&lt;/h2&gt;

&lt;p&gt;Most job queues require extra setup and maintenance. That’s fine for large systems, but for small to mid-size projects? Overkill.&lt;/p&gt;

&lt;p&gt;Cronark keeps it simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No external dependencies&lt;/li&gt;
&lt;li&gt;No queue servers&lt;/li&gt;
&lt;li&gt;No background daemons&lt;/li&gt;
&lt;li&gt;Just PHP + cron&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your server can run cron, you’re good to go.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚙️ Basic Usage
&lt;/h2&gt;

&lt;p&gt;Install via Composer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require nabeghe/cronark
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Create a job:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SendEmailsJob&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;__invoke&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Sending emails...&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Register and run it in a worker:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$cronark&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;\Nabeghe\Cronark\Cronark&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nv"&gt;$cronark&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;addJob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;SendEmailsJob&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nv"&gt;$cronark&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Add to crontab:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; php /path/to/worker.php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Done. Your job runs every minute.&lt;/p&gt;

&lt;h2&gt;
  
  
  🎯 When It Makes Sense
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Cronark is perfect if you:&lt;/li&gt;
&lt;li&gt;Are on shared hosting&lt;/li&gt;
&lt;li&gt;Want lightweight scheduling&lt;/li&gt;
&lt;li&gt;Prefer minimal infrastructure&lt;/li&gt;
&lt;li&gt;Need recurring background tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s not trying to replace enterprise queue systems; it’s built for simplicity and practicality.&lt;/p&gt;

&lt;p&gt;If you like clean solutions with zero drama, this one’s worth checking out.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://github.com/nabeghe/cronark?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Github &amp;amp; Docs&lt;/a&gt;&lt;/p&gt;

</description>
      <category>php</category>
      <category>webdev</category>
      <category>opensource</category>
      <category>backend</category>
    </item>
    <item>
      <title>Light Localization for PHP - Translations</title>
      <dc:creator>Hadi Akbarzadeh</dc:creator>
      <pubDate>Fri, 26 Apr 2024 20:07:15 +0000</pubDate>
      <link>https://forem.com/nabeghe/light-localization-for-php-translations-ek1</link>
      <guid>https://forem.com/nabeghe/light-localization-for-php-translations-ek1</guid>
      <description>&lt;p&gt;My simple #PHP #library for localization&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/nabeghe/light-localization" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A light weight and path-based PHP localization library that translations are loaded up when needed.&lt;/p&gt;

</description>
      <category>php</category>
      <category>phplibrary</category>
      <category>library</category>
    </item>
  </channel>
</rss>
