<?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 for PHP to Ruby</title>
	<atom:link href="http://www.phptoruby.com/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://www.phptoruby.com</link>
	<description>Convert PHP code into Ruby!</description>
	<pubDate>Thu, 23 May 2013 06:36:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on array_change_key_case by Boris Barroso</title>
		<link>http://www.phptoruby.com/array_change_key_case/comment-page-1#comment-13551</link>
		<dc:creator>Boris Barroso</dc:creator>
		<pubDate>Tue, 02 Aug 2011 18:55:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.phptoruby.com/array_change_key_case#comment-13551</guid>
		<description>hash = {'FirSt' =&gt; 1, 'SecOnd' =&gt; 4}
p Hash[hash.keys.map(&amp;:upcase).zip(hash.values)]
# =&gt; {"FIRST"=&gt;1, "SECOND"=&gt;4}</description>
		<content:encoded><![CDATA[<p>hash = {&#8217;FirSt&#8217; =&gt; 1, &#8216;SecOnd&#8217; =&gt; 4}<br />
p Hash[hash.keys.map(&amp;:upcase).zip(hash.values)]<br />
# =&gt; {&#8221;FIRST&#8221;=&gt;1, &#8220;SECOND&#8221;=&gt;4}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on array_combine by Boris Barroso</title>
		<link>http://www.phptoruby.com/array_combine/comment-page-1#comment-13550</link>
		<dc:creator>Boris Barroso</dc:creator>
		<pubDate>Tue, 02 Aug 2011 18:50:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.phptoruby.com/array_combine#comment-13550</guid>
		<description>Another way
p1 = ['python', 'lisp', 'perl']
p2 = ['PY', 'LI', 'PE']
Hash[p1.zip(p2)]</description>
		<content:encoded><![CDATA[<p>Another way<br />
p1 = ['python', 'lisp', 'perl']<br />
p2 = ['PY', 'LI', 'PE']<br />
Hash[p1.zip(p2)]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on printf by Almazko</title>
		<link>http://www.phptoruby.com/printf/comment-page-1#comment-13104</link>
		<dc:creator>Almazko</dc:creator>
		<pubDate>Tue, 19 Jul 2011 19:44:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.phptoruby.com/print-2#comment-13104</guid>
		<description>RUBY:

puts 'There are %d monkeys in the %s' % [5, 'tree']</description>
		<content:encoded><![CDATA[<p>RUBY:</p>
<p>puts &#8216;There are %d monkeys in the %s&#8217; % [5, 'tree']</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on array_flip by Jaume Sola</title>
		<link>http://www.phptoruby.com/array_flip/comment-page-1#comment-12467</link>
		<dc:creator>Jaume Sola</dc:creator>
		<pubDate>Sun, 03 Jul 2011 21:33:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.phptoruby.com/array_flip#comment-12467</guid>
		<description>This is what you would do if you want to flip a Ruby array into a Ruby hash:

a = ["apple", "orange", "banana"]
flipped = {}
a.each_with_index { &#124;e, i&#124; flipped[e] = i }

p flipped
 =&gt; {"apple"=&gt;0, "orange"=&gt;1, "banana"=&gt;2}</description>
		<content:encoded><![CDATA[<p>This is what you would do if you want to flip a Ruby array into a Ruby hash:</p>
<p>a = ["apple", "orange", "banana"]<br />
flipped = {}<br />
a.each_with_index { |e, i| flipped[e] = i }</p>
<p>p flipped<br />
 =&gt; {&#8221;apple&#8221;=&gt;0, &#8220;orange&#8221;=&gt;1, &#8220;banana&#8221;=&gt;2}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on array_fill by Arsenic</title>
		<link>http://www.phptoruby.com/array_fill/comment-page-1#comment-12365</link>
		<dc:creator>Arsenic</dc:creator>
		<pubDate>Fri, 01 Jul 2011 03:45:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.phptoruby.com/array_fill#comment-12365</guid>
		<description>With a hash

a = {}
5.times{&#124;i&#124; a[i+3] = 'php'}
puts a
# =&gt; {3=&gt;"php", 4=&gt;"php", 5=&gt;"php", 6=&gt;"php", 7=&gt;"php"}</description>
		<content:encoded><![CDATA[<p>With a hash</p>
<p>a = {}<br />
5.times{|i| a[i+3] = &#8216;php&#8217;}<br />
puts a<br />
# =&gt; {3=&gt;&#8221;php&#8221;, 4=&gt;&#8221;php&#8221;, 5=&gt;&#8221;php&#8221;, 6=&gt;&#8221;php&#8221;, 7=&gt;&#8221;php&#8221;}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on array_fill_keys by Arsenic</title>
		<link>http://www.phptoruby.com/array_fill_keys/comment-page-1#comment-12364</link>
		<dc:creator>Arsenic</dc:creator>
		<pubDate>Fri, 01 Jul 2011 03:40:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.phptoruby.com/array_fill_keys#comment-12364</guid>
		<description>Why the bleep is this so complicated?
Try this:

result = {}
keys.each{&#124;k&#124; result[k] = 'code'}</description>
		<content:encoded><![CDATA[<p>Why the bleep is this so complicated?<br />
Try this:</p>
<p>result = {}<br />
keys.each{|k| result[k] = &#8216;code&#8217;}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on echo by Adit</title>
		<link>http://www.phptoruby.com/echo/comment-page-1#comment-8684</link>
		<dc:creator>Adit</dc:creator>
		<pubDate>Wed, 20 Apr 2011 09:35:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.phptoruby.com/echo#comment-8684</guid>
		<description>hey my comment went corrupted!

I wanted to add in the two class fields:

[in php]
if($cond) echo 'myclass';

[in ruby]
concat 'myclass' if cond</description>
		<content:encoded><![CDATA[<p>hey my comment went corrupted!</p>
<p>I wanted to add in the two class fields:</p>
<p>[in php]<br />
if($cond) echo &#8216;myclass&#8217;;</p>
<p>[in ruby]<br />
concat &#8216;myclass&#8217; if cond</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on echo by Adit</title>
		<link>http://www.phptoruby.com/echo/comment-page-1#comment-8683</link>
		<dc:creator>Adit</dc:creator>
		<pubDate>Wed, 20 Apr 2011 09:30:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.phptoruby.com/echo#comment-8683</guid>
		<description>I think "concat" is actually the real conversion for "echo".

Please consider the following:
&lt;div class=""&gt;...

The converted:
&lt;div class=""&gt;...

"puts" and "print" are -if i'm not wrong- for background usage (eg. terminal, logs, file, ...)</description>
		<content:encoded><![CDATA[<p>I think &#8220;concat&#8221; is actually the real conversion for &#8220;echo&#8221;.</p>
<p>Please consider the following:<br />
&lt;div class=&#8221;"&gt;&#8230;</p>
<p>The converted:<br />
&lt;div class=&#8221;"&gt;&#8230;</p>
<p>&#8220;puts&#8221; and &#8220;print&#8221; are -if i&#8217;m not wrong- for background usage (eg. terminal, logs, file, &#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on array_merge by Albo</title>
		<link>http://www.phptoruby.com/array_merge/comment-page-1#comment-8340</link>
		<dc:creator>Albo</dc:creator>
		<pubDate>Wed, 13 Apr 2011 18:53:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.phptoruby.com/array_merge#comment-8340</guid>
		<description>When you're merging arrays with different keys you can also use "+" in PHP:

$user = $user_details + $account_details;</description>
		<content:encoded><![CDATA[<p>When you&#8217;re merging arrays with different keys you can also use &#8220;+&#8221; in PHP:</p>
<p>$user = $user_details + $account_details;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on nl2br by RubyLove</title>
		<link>http://www.phptoruby.com/nl2br/comment-page-1#comment-6051</link>
		<dc:creator>RubyLove</dc:creator>
		<pubDate>Thu, 03 Feb 2011 12:49:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.phptoruby.com/nl2br#comment-6051</guid>
		<description>the point of this function is to create &lt;br&gt; tags - when rendered as HTML, these will be line breaks.</description>
		<content:encoded><![CDATA[<p>the point of this function is to create <br /> tags - when rendered as HTML, these will be line breaks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
