<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: How to Reverse a Number in PHP	</title>
	<atom:link href="https://webrewrite.com/reverse-number-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>https://webrewrite.com/reverse-number-in-php/</link>
	<description>Technology Blog Where You Find Programming Tips and Tricks</description>
	<lastBuildDate>Sun, 25 Nov 2018 03:24:12 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>
		By: Raj Kumar Singh		</title>
		<link>https://webrewrite.com/reverse-number-in-php/#comment-935</link>

		<dc:creator><![CDATA[Raj Kumar Singh]]></dc:creator>
		<pubDate>Sun, 23 Apr 2017 03:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://webrewrite.com/?p=1829#comment-935</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://webrewrite.com/reverse-number-in-php/#comment-798&quot;&gt;Arthur Kushmantsev&lt;/a&gt;.

The main purpose for this post is to explain this concept so that even beginners can understand them easily.]]></description>
			<content:encoded><![CDATA[<p>The main purpose for this post is to explain this concept so that even beginners can understand them easily.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Arthur Kushmantsev		</title>
		<link>https://webrewrite.com/reverse-number-in-php/#comment-798</link>

		<dc:creator><![CDATA[Arthur Kushmantsev]]></dc:creator>
		<pubDate>Sat, 12 Nov 2016 08:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://webrewrite.com/?p=1829#comment-798</guid>

					<description><![CDATA[What - why are U doing all this?
Why not using arithmetic approach like this: 

function reverseNum(int $n, int $i = 0)
{
    return ($n === 0) ? $i : reverseNum($n/10, $i*10 + $n%10);
}
Even if U want to use string, then why are U using so many heap with strrev() function, why not just return result with cast?


function reverseNum($num)
{
    return (int)strrev($num);
}]]></description>
			<content:encoded><![CDATA[<p>What &#8211; why are U doing all this?<br />
Why not using arithmetic approach like this: </p>
<p>function reverseNum(int $n, int $i = 0)<br />
{<br />
    return ($n === 0) ? $i : reverseNum($n/10, $i*10 + $n%10);<br />
}<br />
Even if U want to use string, then why are U using so many heap with strrev() function, why not just return result with cast?</p>
<p>function reverseNum($num)<br />
{<br />
    return (int)strrev($num);<br />
}</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
