<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web 3.0, 6 Bladed Razors, 7 Minute Abs &#187; Code Poem</title>
	<atom:link href="http://www.zachleat.com/web/tag/code-poem/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zachleat.com/web</link>
	<description></description>
	<lastBuildDate>Mon, 06 Feb 2012 17:09:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Nursery Rhyme Code Poem [CSS]</title>
		<link>http://www.zachleat.com/web/nursery-rhyme-code-poem-css/</link>
		<comments>http://www.zachleat.com/web/nursery-rhyme-code-poem-css/#comments</comments>
		<pubDate>Sat, 27 Oct 2007 14:04:41 +0000</pubDate>
		<dc:creator>Zach Leatherman</dc:creator>
				<category><![CDATA[Artistic]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code Poem]]></category>
		<category><![CDATA[Nursery Rhymes]]></category>

		<guid isPermaLink="false">http://www.zachleat.com/web/2007/10/27/nursery-rhyme-code-poem-css/</guid>
		<description><![CDATA[Code Poems are fun! The trick is to take a nursery rhyme (but really, it could be any commonplace work of writing &#8211; Famous Speeches, Bible Verses, Famous Quotes, etc.), and then turn it into pseudocode. The code must follow both the programming or markup language you&#8217;re using and the rhyme as closely as possible. [...]]]></description>
			<content:encoded><![CDATA[<p>Code Poems are fun!  The trick is to take a <a href="http://en.wikipedia.org/wiki/List_of_nursery_rhymes_in_English">nursery rhyme</a> (but really, it could be any commonplace work of writing &#8211; Famous Speeches, Bible Verses, Famous Quotes, etc.), and then turn it into pseudocode.  The code must follow both the programming or markup language you&#8217;re using and the rhyme as closely as possible.  See how precise you can make your rhyme fit.  I accept critiques and suggestions for improving me rhyme code (or you could just rewrite my rhyme as you see fit).</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#theChurch</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#theChurch</span> <span style="color: #cc00cc;">#theSteeple</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#theChurch</span> .door<span style="color: #00AA00;">&#91;</span>state<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;open&quot;</span><span style="color: #00AA00;">&#93;</span> <span style="color: #6666ff;">.people</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">visible</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#theChurch</span> <span style="color: #cc00cc;">#theParson</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#theChurch</span> <span style="color: #00AA00;">&gt;</span> <span style="color: #6666ff;">.upstairs</span> <span style="color: #cc00cc;">#theParson</span><span style="color: #3333ff;">:active </span><span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#theChurch</span> <span style="color: #cc00cc;">#theParson</span><span style="color: #00AA00;">:</span>lang<span style="color: #00AA00;">&#40;</span>prayers<span style="color: #00AA00;">&#41;</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><em>The above code poem is released under the BSD license.</em> To use in production environment without error, do not include an element with an id attribute of &#8220;theChurch&#8221;. Obviously I&#8217;m kidding, don&#8217;t use this code. Not even for enterprise software.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachleat.com/web/nursery-rhyme-code-poem-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nursery Rhyme Code Poem [JavaScript]</title>
		<link>http://www.zachleat.com/web/nursery-rhyme-code-poem-js/</link>
		<comments>http://www.zachleat.com/web/nursery-rhyme-code-poem-js/#comments</comments>
		<pubDate>Sat, 27 Oct 2007 02:48:40 +0000</pubDate>
		<dc:creator>Zach Leatherman</dc:creator>
				<category><![CDATA[Artistic]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Code Poem]]></category>
		<category><![CDATA[Nursery Rhymes]]></category>

		<guid isPermaLink="false">http://www.zachleat.com/web/2007/10/26/nursery-rhyme-code-poem-js/</guid>
		<description><![CDATA[&#40;function&#40;&#41; &#123; function BlindMouse&#40;&#41; &#123;&#125; BlindMouse.prototype.tail = true; BlindMouse.prototype.run = function&#40;after&#41; &#123;&#125;; &#160; function Mice&#40;mouse1, mouse2, mouse3&#41; &#123; this.mice = &#91;&#93;; this.mice.push&#40;mouse1, mouse2, mouse3&#41;; this.declare = function&#40;&#41; &#123; return this.mice.length + ' Blind Mice'; &#125;; this.run = function&#40;after&#41; &#123; for&#40;var j=0,k=this.mice.length;j&#60;k ;j++&#41; &#123; this.mice&#91;j&#93;.run&#40;after&#41;; &#125; &#125;; this.cutOff = function&#40;prop, weapon&#41; &#123; for&#40;var j=0,k=this.mice.length;j&#60;k;j++&#41; &#123; this.mice&#91;j&#93;&#91;prop&#93; [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">function</span> BlindMouse<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span>
    BlindMouse.<span style="color: #660066;">prototype</span>.<span style="color: #660066;">tail</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    BlindMouse.<span style="color: #660066;">prototype</span>.<span style="color: #660066;">run</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>after<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">function</span> Mice<span style="color: #009900;">&#40;</span>mouse1<span style="color: #339933;">,</span> mouse2<span style="color: #339933;">,</span> mouse3<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">mice</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">mice</span>.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span>mouse1<span style="color: #339933;">,</span> mouse2<span style="color: #339933;">,</span> mouse3<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">declare</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">mice</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">' Blind Mice'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">run</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>after<span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> j<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>k<span style="color: #339933;">=</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">mice</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>j<span style="color: #339933;">&lt;</span>k <span style="color: #339933;">;</span>j<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">mice</span><span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">run</span><span style="color: #009900;">&#40;</span>after<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">cutOff</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>prop<span style="color: #339933;">,</span> weapon<span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> j<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>k<span style="color: #339933;">=</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">mice</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>j<span style="color: #339933;">&lt;</span>k<span style="color: #339933;">;</span>j<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">mice</span><span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>prop<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">var</span> mice <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Mice<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> BlindMouse<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">new</span> BlindMouse<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">new</span> BlindMouse<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>mice.<span style="color: #660066;">declare</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>mice.<span style="color: #660066;">declare</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">function</span> seeHow<span style="color: #009900;">&#40;</span>they<span style="color: #339933;">,</span> func<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        they<span style="color: #009900;">&#91;</span>func<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    seeHow<span style="color: #009900;">&#40;</span>mice<span style="color: #339933;">,</span> <span style="color: #3366CC;">'run'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    seeHow<span style="color: #009900;">&#40;</span>mice<span style="color: #339933;">,</span> <span style="color: #3366CC;">'run'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">var</span> farmersWife <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> weapon <span style="color: #339933;">=</span> <span style="color: #3366CC;">'Carving Knife'</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#123;</span>
            cutOff<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>creatures<span style="color: #339933;">,</span> prop<span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#123;</span>
                creatures.<span style="color: #660066;">cutOff</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'tail'</span><span style="color: #339933;">,</span> weapon<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    mice.<span style="color: #660066;">run</span><span style="color: #009900;">&#40;</span>farmersWife<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    farmersWife.<span style="color: #660066;">cutOff</span><span style="color: #009900;">&#40;</span>mice<span style="color: #339933;">,</span> <span style="color: #3366CC;">'tail'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">function</span> haveYouSeen<span style="color: #009900;">&#40;</span>obj<span style="color: #339933;">,</span> timeSpan<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>haveYouSeen<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Such a Thing'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'Your Life'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'as '</span> <span style="color: #339933;">+</span> mice.<span style="color: #660066;">declare</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'?'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><em>The above <strong>code poem</strong> is released under the BSD license.  To use in production environment without error, please enclose with a try-catch block.  Obviously I&#8217;m kidding, don&#8217;t use this code.  Not even for enterprise software.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachleat.com/web/nursery-rhyme-code-poem-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nursery Rhyme Code Poem [PHP]</title>
		<link>http://www.zachleat.com/web/nursery-rhyme-design-patterns-php/</link>
		<comments>http://www.zachleat.com/web/nursery-rhyme-design-patterns-php/#comments</comments>
		<pubDate>Sat, 27 Oct 2007 01:54:14 +0000</pubDate>
		<dc:creator>Zach Leatherman</dc:creator>
				<category><![CDATA[Artistic]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Code Poem]]></category>
		<category><![CDATA[Nursery Rhymes]]></category>

		<guid isPermaLink="false">http://www.zachleat.com/web/2007/10/26/nursery-rhyme-design-patterns-php/</guid>
		<description><![CDATA[&#60; ?php class I &#123; public __construct&#40;&#41; &#123; $star = new Star&#40;&#41;; $star-&#62;size = 'little'; $star-&#62;twinkle&#40;&#41;; $star-&#62;twinkle&#40;&#41;; &#160; self::wonder&#40;$star, 'What are you?'&#41;; &#160; $world = new World&#40;&#41;; $world-&#62;elevation = 'So High'; $star-&#62;setAbove&#40;$world&#41;; &#160; $d = new Diamond&#40;&#41;; $d-&#62;position = 'In the sky'; $star-&#62;setLike&#40;$d&#41;; &#160; $star-&#62;twinkle&#40;&#41;; $star-&#62;twinkle&#40;&#41;; $star-&#62;size; // returns 'little' &#160; self::wonder&#40;$star, 'What are you?'&#41;; [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php
<span style="color: #000000; font-weight: bold;">class</span> I <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$star</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Star<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$star</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">size</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'little'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$star</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">twinkle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$star</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">twinkle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #004000;">wonder</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$star</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'What are you?'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$world</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> World<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$world</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">elevation</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'So High'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$star</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setAbove</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$world</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$d</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Diamond<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$d</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">position</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'In the sky'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$star</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setLike</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$d</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$star</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">twinkle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$star</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">twinkle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$star</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">size</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// returns 'little'</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #004000;">wonder</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$star</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'What are you?'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000000; font-weight: bold;">function</span> wonder<span style="color: #009900;">&#40;</span><span style="color: #000088;">$obj</span><span style="color: #339933;">,</span> <span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$obj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><em>The above <strong>code poem</strong> is released under the BSD license.</em>  To use in production environment without error, please precede with the following command: <code>error_reporting(0);</code>  Obviously I&#8217;m kidding, don&#8217;t use this code.  Not even for enterprise software.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachleat.com/web/nursery-rhyme-design-patterns-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

