<?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>DEV Community: Omar Anwar</title>
    <description>The latest articles on DEV Community by Omar Anwar (@omar_anwar).</description>
    <link>https://dev.to/omar_anwar</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3747600%2F2004bea1-0553-45e3-9f04-c8b618d47484.jpg</url>
      <title>DEV Community: Omar Anwar</title>
      <link>https://dev.to/omar_anwar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/omar_anwar"/>
    <language>en</language>
    <item>
      <title>I Brought My Abandoned Downloader Back to Life: uTube Now Runs on Android, Desktop, and CLI</title>
      <dc:creator>Omar Anwar</dc:creator>
      <pubDate>Thu, 29 Oct 2026 10:56:08 +0000</pubDate>
      <link>https://dev.to/omar_anwar/i-brought-my-abandoned-downloader-back-to-life-utube-now-runs-on-android-desktop-and-cli-28dl</link>
      <guid>https://dev.to/omar_anwar/i-brought-my-abandoned-downloader-back-to-life-utube-now-runs-on-android-desktop-and-cli-28dl</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;uTube is a free, open-source downloader for public videos from YouTube, Facebook, Instagram, and X. It started as a terminal tool I abandoned. Here's what it became and how it's built.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A while ago I built a small terminal tool to download YouTube videos. It worked for a while, then it broke, and I did what many of us do with side projects: I archived the repo and moved on.&lt;/p&gt;

&lt;p&gt;Recently I came back to it and rebuilt it properly. Meet &lt;strong&gt;uTube&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy8iku3mhqg9q5ka19uws.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy8iku3mhqg9q5ka19uws.webp" alt="uTube on desktop, Android, and the terminal" width="800" height="569"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is uTube?
&lt;/h2&gt;

&lt;p&gt;uTube is a free, open-source app that downloads &lt;strong&gt;public&lt;/strong&gt; videos from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;YouTube&lt;/li&gt;
&lt;li&gt;Facebook&lt;/li&gt;
&lt;li&gt;Instagram&lt;/li&gt;
&lt;li&gt;X (formerly Twitter)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can save a video as &lt;strong&gt;MP4&lt;/strong&gt; in the quality you choose, or extract just the &lt;strong&gt;MP3&lt;/strong&gt; audio.&lt;/p&gt;

&lt;p&gt;It runs on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📱 &lt;strong&gt;Android&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;🖥️ &lt;strong&gt;Windows, macOS, and Linux&lt;/strong&gt; (desktop app, currently a preview)&lt;/li&gt;
&lt;li&gt;⌨️ &lt;strong&gt;Terminal&lt;/strong&gt; (CLI)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Quality choices
&lt;/h3&gt;

&lt;p&gt;Pick the resolution you want, and see the estimated file size before you download. If that quality can't be downloaded, uTube falls back to the best working lower resolution and tells you which one it saved.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm338w4okg45l0c02tp0m.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm338w4okg45l0c02tp0m.webp" alt="uTube Desktop on Windows showing video preview, MP4 or MP3 choice, and quality picker" width="800" height="699"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Playlists
&lt;/h3&gt;

&lt;p&gt;Download a whole playlist or select only some items. Files from a playlist stay together in their own folder, and one failed item doesn't stop the rest.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp9xav3lu68h2gzy8c4zi.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp9xav3lu68h2gzy8c4zi.webp" alt="uTube on Android: choosing which playlist videos to download" width="717" height="1568"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Android workflow
&lt;/h3&gt;

&lt;p&gt;Share a supported link to uTube, choose video or audio, pick a quality, and start the download. Downloads continue in the background and you can follow progress in notifications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flwdbsnggxyxpuyturt58.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flwdbsnggxyxpuyturt58.webp" alt="uTube on Android: choosing MP4 or MP3 and a video quality with estimated sizes" width="717" height="1568"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it's built
&lt;/h2&gt;

&lt;p&gt;The repository is a small monorepo with three parts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apps/cli/       Terminal interface and command handling
apps/desktop/   Electron, React, and TypeScript desktop app
packages/core/  Shared download engine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The idea was simple: &lt;strong&gt;one shared engine, several interfaces.&lt;/strong&gt; The CLI and the desktop app both sit on top of the same core, so a fix in the engine benefits both.&lt;/p&gt;

&lt;h3&gt;
  
  
  The engine: recover quietly
&lt;/h3&gt;

&lt;p&gt;Downloaders break when platforms change, so the engine is built around recovery:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Requested quality first.&lt;/strong&gt; It tries matching encodings and alternate clients at your chosen resolution. A &lt;code&gt;720p&lt;/code&gt; request can use a &lt;code&gt;720p60&lt;/code&gt; stream.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best working fallback.&lt;/strong&gt; Only when the requested resolution is unavailable or exhausted does it try lower resolutions, from highest to lowest, and it reports the quality that was actually saved.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quiet retries.&lt;/strong&gt; Recovery happens without repeated warnings, and the progress bar doesn't jump back to zero.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audio included.&lt;/strong&gt; Separate video and audio streams are merged into MP4 with FFmpeg. MP3 output uses 192 kbps audio with title metadata.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Android and Desktop
&lt;/h3&gt;

&lt;p&gt;Download the latest build from the website or the GitHub releases page:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Website: &lt;a href="https://omer73364.github.io/uTube/" rel="noopener noreferrer"&gt;https://omer73364.github.io/uTube/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Releases: &lt;a href="https://github.com/omer73364/uTube/releases" rel="noopener noreferrer"&gt;https://github.com/omer73364/uTube/releases&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Android works without extra tools. On desktop, the preview builds are unsigned and macOS builds are not notarized, so your system may show a security prompt. FFmpeg is needed for MP3 audio and for videos that require merging audio and video. You can download it from the app's settings, and the Debian package installs it automatically.&lt;/p&gt;

&lt;h3&gt;
  
  
  CLI
&lt;/h3&gt;

&lt;p&gt;Requires Node.js 20+.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g utube-cli@latest
utube
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This opens an interactive menu. You can also pass a link and a quality directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;utube -u "https://youtu.be/jNQXAC9IVRw" -q 360p
utube --audio -u "https://youtu.be/jNQXAC9IVRw"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu1342epjnfxxjz7ff93v.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu1342epjnfxxjz7ff93v.webp" alt="uTube CLI showing video details and a completed download" width="800" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Contribute
&lt;/h2&gt;

&lt;p&gt;uTube is open source under the MIT license. Bug reports, fixes, translations, and feature ideas are all welcome:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/omer73364/uTube" rel="noopener noreferrer"&gt;https://github.com/omer73364/uTube&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you try it, I'd love to hear what you think, and which platform you'd like to see supported next.&lt;/p&gt;

&lt;p&gt;Thanks for reading! ⭐&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>showdev</category>
      <category>javascript</category>
      <category>android</category>
    </item>
    <item>
      <title>I Missed JavaScript Arrays… So I Rebuilt Them in PHP 🐘</title>
      <dc:creator>Omar Anwar</dc:creator>
      <pubDate>Tue, 03 Feb 2026 14:04:53 +0000</pubDate>
      <link>https://dev.to/omar_anwar/i-missed-javascript-arrays-so-i-rebuilt-them-in-php-13i</link>
      <guid>https://dev.to/omar_anwar/i-missed-javascript-arrays-so-i-rebuilt-them-in-php-13i</guid>
      <description>&lt;p&gt;Moving between JavaScript and PHP is fun... until you touch arrays.&lt;/p&gt;

&lt;p&gt;In JavaScript, chaining array methods feels natural:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In PHP?&lt;br&gt;
You &lt;em&gt;can&lt;/em&gt; do similar things, but it often feels fragmented, noisy, or&lt;br&gt;
less expressive.&lt;/p&gt;

&lt;p&gt;That's why I built &lt;strong&gt;&lt;a href="https://github.com/omer73364/jsarray" rel="noopener noreferrer"&gt;JsArray&lt;/a&gt;&lt;/strong&gt; --- a small PHP library inspired by&lt;br&gt;
JavaScript arrays, focused on &lt;strong&gt;readability, predictability, and&lt;br&gt;
developer happiness&lt;/strong&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  What is JsArray?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/omer73364/jsarray" rel="noopener noreferrer"&gt;JsArray&lt;/a&gt;&lt;/strong&gt; is a lightweight wrapper around native PHP arrays that gives&lt;br&gt;
you familiar methods like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;map&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;filter&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;reduce&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;forEach&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;find&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;every&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;some&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All chainable. All explicit. All pure PHP.&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;$result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;JsArray&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$n&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$n&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;toArray&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// [6, 8]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No magic. No macros. Just clean, readable code.&lt;/p&gt;




&lt;h2&gt;
  
  
  Immutable by Default (Safe Mode 🛡️)
&lt;/h2&gt;

&lt;p&gt;By default, &lt;strong&gt;&lt;a href="https://github.com/omer73364/jsarray" rel="noopener noreferrer"&gt;JsArray&lt;/a&gt; is immutable&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That means every operation returns a &lt;strong&gt;new instance&lt;/strong&gt;, and the original&lt;br&gt;
array stays untouched.&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;$original&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;JsArray&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="nv"&gt;$doubled&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$original&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$n&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nv"&gt;$original&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;toArray&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// [1, 2, 3]&lt;/span&gt;
&lt;span class="nv"&gt;$doubled&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;toArray&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;  &lt;span class="c1"&gt;// [2, 4, 6]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why this matters
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  No accidental side effects&lt;/li&gt;
&lt;li&gt;  Easier debugging&lt;/li&gt;
&lt;li&gt;  More predictable behavior&lt;/li&gt;
&lt;li&gt;  Very familiar if you come from JavaScript or FP-style code&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Mutable Mode (When You Want Performance ⚡)
&lt;/h2&gt;

&lt;p&gt;Sometimes, you &lt;em&gt;do&lt;/em&gt; want to mutate the array directly --- especially in&lt;br&gt;
performance-critical paths.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;mutable mode&lt;/strong&gt;, methods modify the same instance instead of&lt;br&gt;
creating new ones.&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;$array&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;JsArray&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;mutable&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nv"&gt;$array&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$n&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nv"&gt;$array&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$n&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nv"&gt;$array&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;toArray&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// [4, 6]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;If you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;write PHP daily&lt;/li&gt;
&lt;li&gt;enjoy JavaScript-style APIs&lt;/li&gt;
&lt;li&gt;care about readable, maintainable code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then &lt;a href="https://github.com/omer73364/jsarray" rel="noopener noreferrer"&gt;JsArray&lt;/a&gt; might feel right at home.&lt;/p&gt;

&lt;p&gt;I’m still iterating on it, so feedback, ideas, and criticism are very welcome 🙌&lt;br&gt;
DX matters — we stare at this code all day anyway.&lt;/p&gt;

&lt;p&gt;Links: &lt;a href="https://github.com/omer73364/jsarray" rel="noopener noreferrer"&gt;https://github.com/omer73364/jsarray&lt;/a&gt;&lt;/p&gt;

</description>
      <category>php</category>
      <category>javascript</category>
      <category>laravel</category>
      <category>data</category>
    </item>
  </channel>
</rss>
