<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[#PHP is truly the gift that keeps on giving: https:&#x2F;&#x2F;3v4l.org&#x2F;aapUB&#96;&#96;&#96;php$a = [&quot;min&quot;, &quot;max&quot;, &quot;crazy&quot;, &quot;shit&quot;];var_dump(min($a));&#96;&#96;&#96;=&amp;gt; &#96;string(5) &quot;crazy&quot;&#96;]]></title><description><![CDATA[<p><a href="https://phpc.social/tags/PHP" rel="tag">#<span>PHP</span></a> is truly the gift that keeps on giving: <a href="https://3v4l.org/aapUB" rel="nofollow noopener"><span>https://</span><span>3v4l.org/aapUB</span><span></span></a><br />```php<br />$a = ["min", "max", "crazy", "shit"];<br />var_dump(min($a));<br />```<br />=&gt; `string(5) "crazy"`</p><p>Should also work with other comparable types such as DateTime objects.</p>]]></description><link>https://board.circlewithadot.net/topic/de7cd76f-65d1-4018-bfaf-794089ce827e/php-is-truly-the-gift-that-keeps-on-giving-https-3v4l.org-aapub-php-a-min-max-crazy-shit-var_dump-min-a-gt-string-5-crazy</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 08:58:13 GMT</lastBuildDate><atom:link href="https://board.circlewithadot.net/topic/de7cd76f-65d1-4018-bfaf-794089ce827e.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 May 2026 08:43:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to #PHP is truly the gift that keeps on giving: https:&#x2F;&#x2F;3v4l.org&#x2F;aapUB&#96;&#96;&#96;php$a = [&quot;min&quot;, &quot;max&quot;, &quot;crazy&quot;, &quot;shit&quot;];var_dump(min($a));&#96;&#96;&#96;=&amp;gt; &#96;string(5) &quot;crazy&quot;&#96; on Mon, 25 May 2026 10:04:04 GMT]]></title><description><![CDATA[<p><span><a href="/user/saramg%40fosstodon.org">@<span>saramg</span></a></span> <span><a href="/user/girgias%40phpc.social">@<span>Girgias</span></a></span> Not that I'd ever thought to try it, but I checkd it is the documented behaviour, since at least 2005 <a href="https://web.archive.org/web/20050204040528/http://us4.php.net/min" rel="nofollow noopener"><span>https://</span><span>web.archive.org/web/2005020404</span><span>0528/http://us4.php.net/min</span></a> It can take an array as single argument. Will use standard comparison rules. With added caution about mixing types. Accidentally having you numeric string in there cast to an int is going to throw things. But potentially pretty handy I have to agree.</p>]]></description><link>https://board.circlewithadot.net/post/https://drupal.community/users/ekes/statuses/116634644908397647</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://drupal.community/users/ekes/statuses/116634644908397647</guid><dc:creator><![CDATA[ekes@drupal.community]]></dc:creator><pubDate>Mon, 25 May 2026 10:04:04 GMT</pubDate></item><item><title><![CDATA[Reply to #PHP is truly the gift that keeps on giving: https:&#x2F;&#x2F;3v4l.org&#x2F;aapUB&#96;&#96;&#96;php$a = [&quot;min&quot;, &quot;max&quot;, &quot;crazy&quot;, &quot;shit&quot;];var_dump(min($a));&#96;&#96;&#96;=&amp;gt; &#96;string(5) &quot;crazy&quot;&#96; on Mon, 25 May 2026 09:33:55 GMT]]></title><description><![CDATA[<p><span><a href="/user/girgias%40phpc.social">@<span>Girgias</span></a></span> What's wild is how long this has worked and I've never even thought to try it. <a href="https://3v4l.org/YF8KK#v4.3.0" rel="nofollow noopener"><span>https://</span><span>3v4l.org/YF8KK#v4.3.0</span><span></span></a></p><p>Square brackets changed to array() because THAT'S HOW OLD THIS BEHAVIOR IS. IT PREDATES SHORT ARRAY SYNTAX.</p>

<div class="row mt-3"><div class="col-12 mt-3"><img class="img-thumbnail" src="https://cdn.fosstodon.org/media_attachments/files/116/634/520/042/205/723/original/8a494717119cf457.png" alt="Link Preview Image" /></div></div>]]></description><link>https://board.circlewithadot.net/post/https://fosstodon.org/users/saramg/statuses/116634526394625421</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://fosstodon.org/users/saramg/statuses/116634526394625421</guid><dc:creator><![CDATA[saramg@fosstodon.org]]></dc:creator><pubDate>Mon, 25 May 2026 09:33:55 GMT</pubDate></item><item><title><![CDATA[Reply to #PHP is truly the gift that keeps on giving: https:&#x2F;&#x2F;3v4l.org&#x2F;aapUB&#96;&#96;&#96;php$a = [&quot;min&quot;, &quot;max&quot;, &quot;crazy&quot;, &quot;shit&quot;];var_dump(min($a));&#96;&#96;&#96;=&amp;gt; &#96;string(5) &quot;crazy&quot;&#96; on Mon, 25 May 2026 08:50:21 GMT]]></title><description><![CDATA[<p><span><a href="/user/derickr%40phpc.social">@<span>derickr</span></a></span> <span><a href="/user/girgias%40phpc.social">@<span>Girgias</span></a></span> <span><a href="/user/wyri%40toot-toot.wyrihaxim.us">@<span>wyri</span></a></span> I really like it for dates… saves throwing a pointless closure at `usort`. I wouldn't use it for strings tho <img src="https://board.circlewithadot.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f937.png?v=28325c671da" class="not-responsive emoji emoji-android emoji--shrug" style="height:23px;width:auto;vertical-align:middle" title="🤷" alt="🤷" />‍<img src="https://board.circlewithadot.net/assets/plugins/nodebb-plugin-emoji/emoji/android/2642.png?v=28325c671da" class="not-responsive emoji emoji-android emoji--male_sign" style="height:23px;width:auto;vertical-align:middle" title="♂" alt="♂" />️</p>]]></description><link>https://board.circlewithadot.net/post/https://phpc.social/users/george/statuses/116634355096995009</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://phpc.social/users/george/statuses/116634355096995009</guid><dc:creator><![CDATA[george@phpc.social]]></dc:creator><pubDate>Mon, 25 May 2026 08:50:21 GMT</pubDate></item><item><title><![CDATA[Reply to #PHP is truly the gift that keeps on giving: https:&#x2F;&#x2F;3v4l.org&#x2F;aapUB&#96;&#96;&#96;php$a = [&quot;min&quot;, &quot;max&quot;, &quot;crazy&quot;, &quot;shit&quot;];var_dump(min($a));&#96;&#96;&#96;=&amp;gt; &#96;string(5) &quot;crazy&quot;&#96; on Mon, 25 May 2026 08:47:21 GMT]]></title><description><![CDATA[<p><span><a href="/user/girgias%40phpc.social">@<span>Girgias</span></a></span> <span><a href="/user/wyri%40toot-toot.wyrihaxim.us">@<span>wyri</span></a></span> Makes perfect sense to me. Seems like a useful feature.</p>]]></description><link>https://board.circlewithadot.net/post/https://phpc.social/users/derickr/statuses/116634343293106882</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://phpc.social/users/derickr/statuses/116634343293106882</guid><dc:creator><![CDATA[derickr@phpc.social]]></dc:creator><pubDate>Mon, 25 May 2026 08:47:21 GMT</pubDate></item><item><title><![CDATA[Reply to #PHP is truly the gift that keeps on giving: https:&#x2F;&#x2F;3v4l.org&#x2F;aapUB&#96;&#96;&#96;php$a = [&quot;min&quot;, &quot;max&quot;, &quot;crazy&quot;, &quot;shit&quot;];var_dump(min($a));&#96;&#96;&#96;=&amp;gt; &#96;string(5) &quot;crazy&quot;&#96; on Mon, 25 May 2026 08:45:53 GMT]]></title><description><![CDATA[<p><span><a href="/user/wyri%40toot-toot.wyrihaxim.us">@<span>wyri</span></a></span> It uses `&lt;=&gt;` under the hood effectively to "sort and filter" the min/max value.</p>]]></description><link>https://board.circlewithadot.net/post/https://phpc.social/users/Girgias/statuses/116634337479783143</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://phpc.social/users/Girgias/statuses/116634337479783143</guid><dc:creator><![CDATA[girgias@phpc.social]]></dc:creator><pubDate>Mon, 25 May 2026 08:45:53 GMT</pubDate></item><item><title><![CDATA[Reply to #PHP is truly the gift that keeps on giving: https:&#x2F;&#x2F;3v4l.org&#x2F;aapUB&#96;&#96;&#96;php$a = [&quot;min&quot;, &quot;max&quot;, &quot;crazy&quot;, &quot;shit&quot;];var_dump(min($a));&#96;&#96;&#96;=&amp;gt; &#96;string(5) &quot;crazy&quot;&#96; on Mon, 25 May 2026 08:44:36 GMT]]></title><description><![CDATA[<p><span><a href="/user/girgias%40phpc.social">@<span>Girgias</span></a></span> but why <img src="https://board.circlewithadot.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f631.png?v=28325c671da" class="not-responsive emoji emoji-android emoji--scream" style="height:23px;width:auto;vertical-align:middle" title="😱" alt="😱" /></p>]]></description><link>https://board.circlewithadot.net/post/https://toot-toot.wyrihaxim.us/users/wyri/statuses/116634332436630491</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://toot-toot.wyrihaxim.us/users/wyri/statuses/116634332436630491</guid><dc:creator><![CDATA[wyri@toot-toot.wyrihaxim.us]]></dc:creator><pubDate>Mon, 25 May 2026 08:44:36 GMT</pubDate></item></channel></rss>