"Slang" large numbers in php?
<p>Something like this:</p>

<pre><code>echo somefn(2800000000); // outputs '2,8B' for 2,8 billion
echo somefn(2000000); // outputs '2M' for 2 million
echo somefn(5400); // outputs '5,4K' for 5,400
echo somefn('blabla') // outputs 'blabla' as it is because it isn't a number
echo somefn(5) // outputs 5, nothing to simplify
</code></pre>

<p>I know it must be really easy code but I wonder if anyone else has something that accounts for maybe other cases that don't pop in my head right now.</p>

<p><strong>/Edit</strong> I'm looking for something more in the lines of a generalized, built-in PHP function (or something close to that). Pretty much the same way <code>strtotime()</code> can handle things like "weeks" or "months".</p>
