<?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: FizzBuzz in PHP</title>
	<atom:link href="http://www.kevinfrancis.net/journal/2007/04/fizzbuzz-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kevinfrancis.net/journal/2007/04/fizzbuzz-in-php/</link>
	<description>the occasional journal of kevin francis</description>
	<lastBuildDate>Mon, 30 Jan 2012 19:00:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: henrik</title>
		<link>http://www.kevinfrancis.net/journal/2007/04/fizzbuzz-in-php/comment-page-1/#comment-1239</link>
		<dc:creator>henrik</dc:creator>
		<pubDate>Wed, 20 Jul 2011 13:49:55 +0000</pubDate>
		<guid isPermaLink="false">http://inactiva.org/journal/2007/04/12/fizzbuzz-in-php/#comment-1239</guid>
		<description>&lt;p&gt;Here&#039;s a oneliner for you, write to be as short as possible;
for($i=0;++$i&lt;101;)echo $i%15?$i%5?$i%3?$i:&#039;Fizz&#039;:&#039;Buzz&#039;:&#039;FizzBuzz&#039;,&#039;&#039;;&lt;/p&gt;

&lt;p&gt;I use this before even calling for interviews, you&#039;d be surprised how many fail. As of now, the most common fail is to check for mod 3 and 5 first, then in another elseif check for 3 and 5 together...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a oneliner for you, write to be as short as possible;
for($i=0;++$i&lt;101;)echo $i%15?$i%5?$i%3?$i:&#8217;Fizz&#8217;:'Buzz&#8217;:'FizzBuzz&#8217;,&#8221;;</p>

<p>I use this before even calling for interviews, you&#8217;d be surprised how many fail. As of now, the most common fail is to check for mod 3 and 5 first, then in another elseif check for 3 and 5 together&#8230;</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Francis</title>
		<link>http://www.kevinfrancis.net/journal/2007/04/fizzbuzz-in-php/comment-page-1/#comment-968</link>
		<dc:creator>Kevin Francis</dc:creator>
		<pubDate>Mon, 25 Apr 2011 02:03:12 +0000</pubDate>
		<guid isPermaLink="false">http://inactiva.org/journal/2007/04/12/fizzbuzz-in-php/#comment-968</guid>
		<description>&lt;p&gt;@Eric I think it just tests whether you can do basic conditional code. Even if you forget the mod operator, you should still demonstrate cluefulness :)&lt;/p&gt;

&lt;p&gt;@James has an example of cluefulness in his solution despite forgetting all about mod.&lt;/p&gt;

&lt;p&gt;@Pete textbook perfect!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Eric I think it just tests whether you can do basic conditional code. Even if you forget the mod operator, you should still demonstrate cluefulness :)</p>

<p>@James has an example of cluefulness in his solution despite forgetting all about mod.</p>

<p>@Pete textbook perfect!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Pete Hawkins</title>
		<link>http://www.kevinfrancis.net/journal/2007/04/fizzbuzz-in-php/comment-page-1/#comment-967</link>
		<dc:creator>Pete Hawkins</dc:creator>
		<pubDate>Mon, 18 Apr 2011 13:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://inactiva.org/journal/2007/04/12/fizzbuzz-in-php/#comment-967</guid>
		<description>&lt;p&gt;i think the fastest way to do it in php:
$result = null;
    $i = 0;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;for($i=1;$i&lt;100;$i++){
    $result .= ( $i % 3 === 0 ? ($i % 5 === 0 ? &#039;Fizz Buzz&lt;br /&gt;&#039; : &#039;Fizz&lt;br /&gt;&#039; ) : ($i % 5 === 0 ? &#039;Buzz&lt;br /&gt;&#039; : $i . &#039;&lt;br /&gt;&#039; ) );
}

echo $result;
&lt;/code&gt;&lt;/pre&gt;
</description>
		<content:encoded><![CDATA[<p>i think the fastest way to do it in php:
$result = null;
    $i = 0;</p>

<pre><code>for($i=1;$i&lt;100;$i++){
    $result .= ( $i % 3 === 0 ? ($i % 5 === 0 ? 'Fizz Buzz&lt;br /&gt;' : 'Fizz&lt;br /&gt;' ) : ($i % 5 === 0 ? 'Buzz&lt;br /&gt;' : $i . '&lt;br /&gt;' ) );
}

echo $result;
</code></pre>]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.kevinfrancis.net/journal/2007/04/fizzbuzz-in-php/comment-page-1/#comment-966</link>
		<dc:creator>James</dc:creator>
		<pubDate>Mon, 18 Apr 2011 12:12:31 +0000</pubDate>
		<guid isPermaLink="false">http://inactiva.org/journal/2007/04/12/fizzbuzz-in-php/#comment-966</guid>
		<description>&lt;p&gt;Took a crack at it, here&#039;s what I came up with; forgot all about mod!
&lt;?
$i=0;
while ($i &lt;= 100) {
    $i++;
    echo $i;
    if (is_int($i / 3)) echo &#039;Fizz&#039;;
    if (is_int($i / 5)) echo &#039;Buzz&#039;;
    echo &#039;&#039;;
}
?&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Took a crack at it, here&#8217;s what I came up with; forgot all about mod!
&lt;?
$i=0;
while ($i &lt;= 100) {
    $i++;
    echo $i;
    if (is_int($i / 3)) echo &#039;Fizz&#039;;
    if (is_int($i / 5)) echo &#039;Buzz&#039;;
    echo &#039;&#8217;;
}
?&gt;</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention equivocal ramblings - FizzBuzz in PHP -- Topsy.com</title>
		<link>http://www.kevinfrancis.net/journal/2007/04/fizzbuzz-in-php/comment-page-1/#comment-954</link>
		<dc:creator>Tweets that mention equivocal ramblings - FizzBuzz in PHP -- Topsy.com</dc:creator>
		<pubDate>Tue, 15 Feb 2011 11:59:39 +0000</pubDate>
		<guid isPermaLink="false">http://inactiva.org/journal/2007/04/12/fizzbuzz-in-php/#comment-954</guid>
		<description>&lt;p&gt;[...] This post was mentioned on Twitter by Pinceladas da Web, Fausto G. Cintra. Fausto G. Cintra said: RT @pinceladasdaweb: FizzBuzz in PHP: http://migre.me/3SE6E [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Pinceladas da Web, Fausto G. Cintra. Fausto G. Cintra said: RT @pinceladasdaweb: FizzBuzz in PHP: <a href="http://migre.me/3SE6E" rel="nofollow">http://migre.me/3SE6E</a> [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://www.kevinfrancis.net/journal/2007/04/fizzbuzz-in-php/comment-page-1/#comment-811</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Thu, 19 Mar 2009 16:11:01 +0000</pubDate>
		<guid isPermaLink="false">http://inactiva.org/journal/2007/04/12/fizzbuzz-in-php/#comment-811</guid>
		<description>&lt;p&gt;I think the FizzBuzz tests whether someone remembers that there is a modulus operator (%).  All of the poor solutions I have seen are where people didn&#039;t know/forgot that they could use %.&lt;/p&gt;

&lt;p&gt;Here&#039;s another solution just for fun:&lt;/p&gt;

&lt;p&gt;for ($i=1,$f=&#039;Fizz&#039;,$b=&#039;Buzz&#039;;$i&lt;=100;$i++) echo $i%3+$i%5&lt;1 ? $f.$b : ($i%3&lt;1 ? $f : ($i%5&lt;1 ? $b : $i)), &#039;&#039;;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I think the FizzBuzz tests whether someone remembers that there is a modulus operator (%).  All of the poor solutions I have seen are where people didn&#8217;t know/forgot that they could use %.</p>

<p>Here&#8217;s another solution just for fun:</p>

<p>for ($i=1,$f=&#8217;Fizz&#8217;,$b=&#8217;Buzz&#8217;;$i&lt;=100;$i++) echo $i%3+$i%5&lt;1 ? $f.$b : ($i%3&lt;1 ? $f : ($i%5&lt;1 ? $b : $i)), &#8221;;</p>]]></content:encoded>
	</item>
	<item>
		<title>By: rune_kg</title>
		<link>http://www.kevinfrancis.net/journal/2007/04/fizzbuzz-in-php/comment-page-1/#comment-766</link>
		<dc:creator>rune_kg</dc:creator>
		<pubDate>Thu, 05 Feb 2009 21:45:20 +0000</pubDate>
		<guid isPermaLink="false">http://inactiva.org/journal/2007/04/12/fizzbuzz-in-php/#comment-766</guid>
		<description>&lt;p&gt;pretty enough?&lt;/p&gt;

&lt;p&gt;&lt;?php
foreach (range(1, 100) as $i) {
   $mod=array($i,&quot;Bizz&quot;,&quot;Buzz&quot;,&quot;BizzBuzz&quot;);
   echo $mod[(!($i%5))+2*($i%7==0)].&#039; &#039;;
}&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>pretty enough?</p>

<p>&lt;?php
foreach (range(1, 100) as $i) {
   $mod=array($i,&#8221;Bizz&#8221;,&#8221;Buzz&#8221;,&#8221;BizzBuzz&#8221;);
   echo $mod[(!($i%5))+2*($i%7==0)].&#8217; &#8216;;
}</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Coleman</title>
		<link>http://www.kevinfrancis.net/journal/2007/04/fizzbuzz-in-php/comment-page-1/#comment-139</link>
		<dc:creator>Jeremy Coleman</dc:creator>
		<pubDate>Mon, 04 Jun 2007 04:42:18 +0000</pubDate>
		<guid isPermaLink="false">http://inactiva.org/journal/2007/04/12/fizzbuzz-in-php/#comment-139</guid>
		<description>&lt;p&gt;I found this post randomly googling some PHP issue and thought I would put my spin on it.  I consider myself a below entry level programmer, it&#039;s a hobby that I hope to someday turn into a job.  Anyway, here&#039;s my convoluted solution.&lt;/p&gt;

&lt;p&gt;$c = &quot;Fizz&quot;;
$d = &quot;Buzz&quot;;
$e = &quot;n&quot;;&lt;/p&gt;

&lt;p&gt;for($i=1;$i&lt;=100;$i++){
$a = $i%3;
$b = $i%5;
    if(!$a){
        if(!$b){
            echo $c.$d.$e;
        }else{
            echo $c.$e;
        }
    }elseif(!$b){
        echo $d.$e;
    }else{
        echo $i.$e;
    }
}&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I found this post randomly googling some PHP issue and thought I would put my spin on it.  I consider myself a below entry level programmer, it&#8217;s a hobby that I hope to someday turn into a job.  Anyway, here&#8217;s my convoluted solution.</p>

<p>$c = &#8220;Fizz&#8221;;
$d = &#8220;Buzz&#8221;;
$e = &#8220;n&#8221;;</p>

<p>for($i=1;$i&lt;=100;$i++){
$a = $i%3;
$b = $i%5;
    if(!$a){
        if(!$b){
            echo $c.$d.$e;
        }else{
            echo $c.$e;
        }
    }elseif(!$b){
        echo $d.$e;
    }else{
        echo $i.$e;
    }
}</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Francis</title>
		<link>http://www.kevinfrancis.net/journal/2007/04/fizzbuzz-in-php/comment-page-1/#comment-144</link>
		<dc:creator>Kevin Francis</dc:creator>
		<pubDate>Wed, 09 May 2007 13:04:32 +0000</pubDate>
		<guid isPermaLink="false">http://inactiva.org/journal/2007/04/12/fizzbuzz-in-php/#comment-144</guid>
		<description>&lt;p&gt;Wow Jyrki that certainly is a very umm compact answer :P&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Wow Jyrki that certainly is a very umm compact answer :P</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jyrki</title>
		<link>http://www.kevinfrancis.net/journal/2007/04/fizzbuzz-in-php/comment-page-1/#comment-143</link>
		<dc:creator>Jyrki</dc:creator>
		<pubDate>Wed, 09 May 2007 07:41:07 +0000</pubDate>
		<guid isPermaLink="false">http://inactiva.org/journal/2007/04/12/fizzbuzz-in-php/#comment-143</guid>
		<description>&lt;p&gt;How about 75 bytes? Geeky enough? :)&lt;/p&gt;

&lt;p&gt;for($i=1;$i&lt;101;$i++)echo $i%15?$i%5?$i%3?$i:&#039;Fizz&#039;:&#039;Buzz&#039;:&#039;FizzBuzz&#039;,&quot;\n&quot;;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>How about 75 bytes? Geeky enough? :)</p>

<p>for($i=1;$i&lt;101;$i++)echo $i%15?$i%5?$i%3?$i:&#8217;Fizz&#8217;:'Buzz&#8217;:'FizzBuzz&#8217;,&#8221;\n&#8221;;</p>]]></content:encoded>
	</item>
</channel>
</rss>

