<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="https://sandfox.me/assets/xml/atom.xsl" type="text/xsl media="all"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom">
  <title>Sand Fox (Posts about psr)</title>
  <id>https://sandfox.me/tags/psr.xml</id>
  <updated>2026-09-02T00:44:45Z</updated>
  <author>
    <name>Anton Smirnov</name>
  </author>
  <link rel="self" type="application/atom+xml" href="https://sandfox.me/tags/psr.xml"/>
  <link rel="alternate" type="text/html" href="https://sandfox.me/tags/psr.html"/>
  <generator uri="https://getnikola.com/">Nikola</generator>
  <entry>
    <title>March Packages on Packagist</title>
    <id>https://sandfox.me/php/arithmetics-clock-torrent.html</id>
    <updated>2023-03-31T04:05:00+03:00</updated>
    <published>2023-03-31T04:05:00+03:00</published>
    <author>
      <name>Anton Smirnov</name>
    </author>
    <link rel="alternate" type="text/html" href="https://sandfox.me/php/arithmetics-clock-torrent.html"/>
    <summary type="html">&lt;p&gt;I'm continuing to publish useless nih junk on the Packagist:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://packagist.org/packages/arokettu/arithmetic-parser"&gt;arokettu/arithmetic-parser&lt;/a&gt;:
A very configurable arithmetic parser and calculator.
You can define your own set of functions and operators.
You can even disable multiplication if you want to!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://packagist.org/packages/arokettu/clock"&gt;arokettu/clock&lt;/a&gt;:
A set of PSR-20 clock implementations.
Everyone has these implemented so why not me? :D&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://packagist.org/packages/arokettu/system-clock"&gt;arokettu/system-clock&lt;/a&gt;:
All these PSR-20 clock packages usually contain a ton of clocks for testing purposes but
most of the production code needs only &lt;code class="docutils literal"&gt;new &lt;span class="pre"&gt;DateTimeImmutable('now')&lt;/span&gt;&lt;/code&gt;
so I extracted SystemClock to a separate package that has only SystemClock.php and composer.json
for the smallest possible package (if you don't count uglifying it js-like)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://packagist.org/packages/arokettu/kilo-mega"&gt;arokettu/kilo-mega&lt;/a&gt;:
This one was actually released on February but I've forgot to write about it.
It's a simple formatter for metric prefixes.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code php"&gt;&lt;a id="rest_code_1c2176720c3c487f93823921c8053d90-1" name="rest_code_1c2176720c3c487f93823921c8053d90-1" href="https://sandfox.me/php/arithmetics-clock-torrent.html#rest_code_1c2176720c3c487f93823921c8053d90-1"&gt;&lt;/a&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;a id="rest_code_1c2176720c3c487f93823921c8053d90-2" name="rest_code_1c2176720c3c487f93823921c8053d90-2" href="https://sandfox.me/php/arithmetics-clock-torrent.html#rest_code_1c2176720c3c487f93823921c8053d90-2"&gt;&lt;/a&gt;&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nx"&gt;format_metric&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;suffix&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'W'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 1.0 kW&lt;/span&gt;
&lt;a id="rest_code_1c2176720c3c487f93823921c8053d90-3" name="rest_code_1c2176720c3c487f93823921c8053d90-3" href="https://sandfox.me/php/arithmetics-clock-torrent.html#rest_code_1c2176720c3c487f93823921c8053d90-3"&gt;&lt;/a&gt;&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nx"&gt;format_bytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1234&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 1.2 KiB&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also a new significant release:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://packagist.org/packages/arokettu/torrent-file"&gt;arokettu/torrent-file&lt;/a&gt;:
Torrent file class got file listing classes for v1 and v2 metadata in 5.0 release.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;</summary>
    <category term="bittorrent" label="bittorrent"/>
    <category term="clock" label="clock"/>
    <category term="libraries" label="libraries"/>
    <category term="math" label="math"/>
    <category term="packagist" label="packagist"/>
    <category term="psr" label="psr"/>
  </entry>
</feed>
