<?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>Vance Lucas &#187; PHP</title>
	<atom:link href="http://www.vancelucas.com/blog/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vancelucas.com</link>
	<description>Web Entrepreneur and PHP5 Guru</description>
	<lastBuildDate>Wed, 07 Jul 2010 17:37:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Get Only Public Class Properties for the Current Class in PHP</title>
		<link>http://www.vancelucas.com/blog/get-only-public-class-properties-for-current-class-in-php/</link>
		<comments>http://www.vancelucas.com/blog/get-only-public-class-properties-for-current-class-in-php/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 23:06:01 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[class properties]]></category>
		<category><![CDATA[classes]]></category>
		<category><![CDATA[oo]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=525</guid>
		<description><![CDATA[PHP provides two built-in functions to retrieve properties of a given class &#8211; get_object_vars and get_class_vars. Both these functions behave the same exact way, one taking an object as a variable and the other taking a string class name. The tricky thing about the two functions is that they behave differently depending on the call [...]]]></description>
			<content:encoded><![CDATA[<p>PHP provides two built-in functions to retrieve properties of a given class &#8211; <a href="http://php.net/get_object_vars">get_object_vars</a> and <a href="http://php.net/get_class_vars">get_class_vars</a>. Both these functions behave the same exact way, one taking an object as a variable and the other taking a string class name. The tricky thing about the two functions is that they behave differently depending on the call scope, returning all of the class variables available within the called scope. So if you call either function within the current class you need properties from, all properties are returned &#8211; public, protected, and private &#8211; because the current scope has access to them all. This makes seemingly simple things like returning all the public properties within the current class a bit of a pain if you want to keep the code inside the class itself.<br />
<span id="more-525"></span><br />
The obvious solution is to use the functions from a different call scope, which means either moving the call outside the class to the implementation code (yuck), or creating a new function outside the class for it. A lot of suggestions in the PHP manual say to create a new function below the class definition and call it within the class (kind of a proxy function as a workaround), but that seems tacky. Luckily, PHP also provides another way to get a new call scope: <a href="http://php.net/manual/en/functions.anonymous.php">anonymous functions</a> (and <em>closures</em> as of PHP 5.3).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> BobUser
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'bob'</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$publicFlag</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	protected <span style="color: #000088;">$internalFlag</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getFields<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$getFields</span> <span style="color: #339933;">=</span> <span style="color: #990000;">create_function</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'$obj'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'return get_object_vars($obj);'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$getFields</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Returns only 'name' and 'publicFlag'</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>We can also do this the PHP 5.3 way with a much nicer-looking closure:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> BobUser
<span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">// ...</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getFields<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$getFields</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$obj</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">return</span> <span style="color: #990000;">get_object_vars</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$obj</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$getFields</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</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></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/get-only-public-class-properties-for-current-class-in-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why WordPress Should Not Have Won the Open Source CMS Award</title>
		<link>http://www.vancelucas.com/blog/wordpress-and-the-open-source-cms-award/</link>
		<comments>http://www.vancelucas.com/blog/wordpress-and-the-open-source-cms-award/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 19:10:26 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[awards]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[MODx]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[open source cms awards]]></category>
		<category><![CDATA[SilverStripe]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=498</guid>
		<description><![CDATA[Packt Publishing announced the winners for their annual Open Source CMS Award in November, and since then I have been a bit disturbed that the 2009 winner was WordPress. My first reaction was this:
&#8220;&#8230; So a blogging platform won the content management system award? How sad is that?&#8221;
My knee-jerk &#8220;how sad is that?&#8221; reaction comes [...]]]></description>
			<content:encoded><![CDATA[<p>Packt Publishing announced the winners for their annual <a href="http://www.packtpub.com/award">Open Source CMS Award</a> in November, and since then I have been a bit disturbed that the 2009 <a href="http://wordpress.org/development/2009/11/wordpress-wins-cms-award/">winner was WordPress</a>. My first reaction was this:</p>
<blockquote><p>&#8220;&#8230; So a <em>blogging platform</em> won the <em>content management system</em> award? How sad is that?&#8221;</p></blockquote>
<p>My knee-jerk &#8220;how sad is that?&#8221; reaction comes not because I don&#8217;t think WordPress is worthy, but because of what it implies about the state of other open source CMS projects. The reaction comes from the fact that <em>a </em><strong>blogging platform is kicking your CMS&#8217;s ass in its own category</strong>.</p>
<p><span id="more-498"></span></p>
<p>WordPress bridges both the blogging and CMS categories due to the &#8216;Pages&#8217; feature, and is extremely useful for managing a blog-focused website. Mostly. That is, until you want to do something that a CMS should be good at, like have an event calendar, custom form, photo gallery, etc. &#8211; which is why WordPress is not focused on being a CMS in the first place. Yet <em>it does such a better job at the basic things</em> like creating new pages, tagging, categorizing, comments, and having custom SEO-friendly URLs out of the box that it edged out other software projects like <del><a href="http://drupal.org/">Drupal</a></del> <a href="http://modxcms.com/">MODx</a> and <del><a href="http://www.joomla.org/">Joomla!</a></del> <a href="http://www.silverstripe.com/">SilverStripe</a> whose sole focus is content management. Sad indeed.</p>
<p>The fact that I can go through <a href="http://php.opensourcecms.com/scripts/show.php?catid=1&amp;cat=CMS%20/%20Portals">literally hundreds</a> of open source content management systems and still end up settling on WordPress because I know it&#8217;s the only one that won&#8217;t totally confuse my client is what&#8217;s sad. Usability and ease of use matter. They are the number one feature to the end user. If you&#8217;re involved in a CMS project, you need to do better. A <em>lot</em> better. <strong>Right now</strong>.</p>
<p><strong>UPDATE</strong>: Some commenters have pointed out that the awards website has a specific rule:</p>
<blockquote><p>Previous winners of the Overall category are not eligible for the Overall category in 2009. Previous winners compete amongst one another in a separate Hall of Fame category designed specifically for them.</p></blockquote>
<p>Since both Drupal and Joomla! have won the award previously and thus were automatically excluded, I replaced their names with the CMS projects that were 2nd and 3rd behind WordPress (MODx and SilverStripe) instead. The premise of the post still holds true.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/wordpress-and-the-open-source-cms-award/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>CodeWorks 2009 Dallas</title>
		<link>http://www.vancelucas.com/blog/codeworks-2009-dallas/</link>
		<comments>http://www.vancelucas.com/blog/codeworks-2009-dallas/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 05:03:52 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Speaking Engagements]]></category>
		<category><![CDATA[codeworks]]></category>
		<category><![CDATA[cw09]]></category>
		<category><![CDATA[speaking]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=436</guid>
		<description><![CDATA[
I was fortunate enough to be selected as the regional speaker for the Dallas CodeWorks 2009 stop by the Dallas PHP User Group through a community voting and selection process. My talk was entitled Object Oriented Apologetics, and was essentially about letting people know what good object-oriented code is, when to use it, how to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://cw.mtacon.com/schedule/speakers#vance_lucas"><img class="alignright" src="http://www.vancelucas.com/wp-content/uploads/2009/09/CW09_Speaker.png" alt="CodeWorks 2009 Speaker" width="150" height="200" /></a><br />
I was fortunate enough to be selected as the regional speaker for the Dallas <a href="http://cw.mtacon.com/">CodeWorks 2009</a> stop by the <a href="http://dallasphp.org">Dallas PHP User Group</a> through a community voting and selection process. My talk was entitled <strong>Object Oriented Apologetics</strong>, and was essentially about letting people know what good object-oriented code is, when to use it, how to use it, and more specifically <em>why</em> to use it over traditional procedural PHP code.<span id="more-436"></span></p>
<h3>Object Oriented Apologetics</h3>
<blockquote><p>In defense of object-oriented programming &#8211; How and why you should use object oriented programming for your next project.This talk is for PHP programmers who are just learning about object oriented code, who cling to old excuses(&#8220;object oriented code is slower&#8221;), or who are otherwise unconvinced of its usefulness. Concrete real-world examples of commonscenarios and challenges that programmers face will be presented, and how taking an object oriented approach is better than a proceduralone in most cases. Copious code examples in both object oriented and procedural approaches will be provided throughout, and thedifferences and benefits of the object oriented approach will be explained.</p></blockquote>
<div id="__ss_2092025" style="width: 425px; text-align: left;"><object style="margin:0px" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=objectorientedapologetics-090929144850-phpapp02&amp;rel=0&amp;stripped_title=object-oriented-apologetics" /><param name="allowfullscreen" value="true" /><embed style="margin:0px" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=objectorientedapologetics-090929144850-phpapp02&amp;rel=0&amp;stripped_title=object-oriented-apologetics" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<p><a href="http://www.slideshare.net/vlucas/object-oriented-apologetics">Download Object Oriented Apologetics on SlideShare</a></p>
<p>If you were in the talk, <a href="http://joind.in/talk/view/722">please rate it on Joind.in</a></p>
<h3>The CodeWorks Experience</h3>
<p>All in all, the CodeWorks roadshow Dallas stop was much smaller than I expected. There were about 20 people in the talk I gave. I suppose it was both a good a bad thing. On one hand, I had a lot of fun connecting with the other speakers and attendees on a more personal level than I would have had the opportunity to do otherwise. I met a lot of new people in the PHP community that I will probably stay connected with on some level, even if it is just <a href="http://twitter.com">Twitter</a> and IRC. We had a lot of fun the night before the presentation day eating together and hanging out.</p>
<p>On the other hand, I know that as a business, the relatively low attendance levels coupled with the high travel expenses could mean that something like this can&#8217;t happen again, which is a shame. This was one of the best efforts I have seen in a while to really lower the price of the conference for attendees by bringing the speakers directly to their cities or at least ones that are close by. Going to <a href="http://www.zendcon.com">ZendCon</a>, for instance, could easily cost up to $2,500 for the whole trip with airfare, hotel stays, and food, if not more.</p>
<p>The bottom line here is that CodeWorks was a good conference that offered a great value for your money. I had a great time meeting and connecting with new people and finally meeting people in real life that I had been communicating with for years. I learned some new things and finally got the kick in the pants I needed to jump into <a href="http://en.wikipedia.org/wiki/Test-driven_development">Test Driven Development</a>, thanks to <a href="http://blog.casey-sweat.us/">Jason Sweat&#8217;</a>s TDD tutorial and hand-holding.</p>
<p>Now I&#8217;m just looking forward to php|tek in May 2010.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/codeworks-2009-dallas/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The One Character Block Comment</title>
		<link>http://www.vancelucas.com/blog/the-one-character-block-comment/</link>
		<comments>http://www.vancelucas.com/blog/the-one-character-block-comment/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 14:58:10 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[code comments]]></category>
		<category><![CDATA[comments]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=401</guid>
		<description><![CDATA[When debugging, I often find that I have to comment and un-comment a block of code several times during the process of trying to find out what&#8217;s going on. That used to mean typing and deleting comment block characters repetitively, but not anymore. Here&#8217;s a simple solution to that problem: Comment or un-comment an entire [...]]]></description>
			<content:encoded><![CDATA[<p>When debugging, I often find that I have to comment and un-comment a block of code several times during the process of trying to find out what&#8217;s going on. That used to mean typing and deleting comment block characters repetitively, but not anymore. Here&#8217;s a simple solution to that problem: Comment or un-comment an entire code block of code by typing or deleting a single character.</p>
<p>I was able to arrive at this solution by combining the one-line comment with the comment block in a way that takes advantage of the rules the different types of comments have to follow.<br />
<span id="more-401"></span></p>
<h3>The One-Line Comment</h3>
<p>One-line comment rules dictate that everything after the comment characters must be ignored for the rest of that line. They look like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// My code below</span>
<span style="color: #000088;">$someVar</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;foo&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;bar&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;blah&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;code&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$someVar</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/code&gt;&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>The Block Comment</h3>
<p>Block comment rules dictate that once the beginning characters are started, everything up until the ending characters is ignored. They look like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* My code below
$someVar = array(&quot;foo&quot;, &quot;bar&quot;, &quot;blah&quot;);
echo &quot;&lt;code&gt;&quot;;
print_r($someVar);
echo &quot;&lt;/code&gt;&quot;;
*/</span></pre></td></tr></table></div>

<h3>Combining The Two: The Best of Both Worlds</h3>
<p>Using both those comment style rules, we can combine the two comment styles in a way that will allow us to comment and un-comment a block of code with by adding or deleting a single character. The trick is to make both the beginning and ending lines both single-line AND block style comments, like so:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//* My code below</span>
<span style="color: #000088;">$someVar</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;foo&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;bar&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;blah&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;code&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$someVar</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/code&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// */</span></pre></td></tr></table></div>

<p>In the above example, you notice that the code will still run &#8211; it&#8217;s not commented out because the first line is following the rules of the single-line comment &#8211; ignoring the block comment declaration on the same line. By removing the first backslash at the beginning of the block, we can comment out the entire code block by enabling the block comment style instead of the single-line style. The last single-comment line is ignored because the block comment rules ignore everything up until the end block comment declaration at the end of the line:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* My code below
$someVar = array(&quot;foo&quot;, &quot;bar&quot;, &quot;blah&quot;);
echo &quot;&lt;code&gt;&quot;;
print_r($someVar);
echo &quot;&lt;/code&gt;&quot;;
// */</span></pre></td></tr></table></div>

<p>So a single character &#8211; a backslash at the very beginning of the block declaration can now comment or un-comment the entire block by switching the comment rules back and forth between single-line and block style. The code examples provided are in PHP, but this trick will work with any language that supports both single-line and block style comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/the-one-character-block-comment/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>OKC PHP User Group Reboot</title>
		<link>http://www.vancelucas.com/blog/okc-php-user-group-reboot/</link>
		<comments>http://www.vancelucas.com/blog/okc-php-user-group-reboot/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 14:58:00 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Speaking Engagements]]></category>
		<category><![CDATA[okcphp]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[PHP DataMapper]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=368</guid>
		<description><![CDATA[The local Oklahoma City PHP User Group is re-starting with the okcCoCo as the new venue. The new meetings will be on the second Tuesday of each month, starting with Tuesday, June 09, 2009 at 6:30pm as the first official meeting. Visit the official OKC PHP User Group website to register for meeting reminders and [...]]]></description>
			<content:encoded><![CDATA[<p>The local Oklahoma City PHP User Group is re-starting with the <a href="http://okccoco.com">okcCoCo</a> as the new venue. The new meetings will be on the second Tuesday of each month, starting with <strong>Tuesday, June 09, 2009 at 6:30pm</strong> as the first official meeting. Visit the official <a href="http://phpokc.net">OKC PHP User Group website</a> to register for meeting reminders and to connect with other local PHP developers.</p>
<p>I will be presenting my talk on<strong> Building a Data Mapper with PHP5 and the Standard PHP Library</strong>, followed by a discussion on ORMs and whatever else comes up. The presentation will cover all the thought processes, goals, theories, and actual code that goes into building an ORM (or really any other larger project that requires more advance planning). The project that was the basis of this presentation is <a href="http://phpdatamapper.com">phpDataMapper</a> &#8211; an open-source PHP5 data mapper ORM layer that I started in the fall of 2008. It now powers the model layer of <a title="InvoiceMore - Online Billing and Invoicing" href="http://www.invoicemore.com">InvoiceMore</a>, a live web application I launched in March 2009.</p>
<p>This is a presentation I have given before at Tulsa TechFest.</p>
<p><strong><a href="http://blip.tv/file/2249586/">Watch the video of this presentation online</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/okc-php-user-group-reboot/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Introducing&#8230; PHP DataMapper!</title>
		<link>http://www.vancelucas.com/blog/introducing-php-datamapper/</link>
		<comments>http://www.vancelucas.com/blog/introducing-php-datamapper/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 17:11:58 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[PHP DataMapper]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=212</guid>
		<description><![CDATA[PHP DataMapper is an open-source project I&#8217;ve been building and working on for a little while now.  It&#8217;s a lightweight Object-Relational Mapper based on the Data Mapper design pattern, setup using one mapper per table.  The primary goal is to make database access one of the easiest parts of building your application instead of the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://phpdatamapper.com">PHP DataMapper</a> is an open-source project I&#8217;ve been building and working on for a little while now.  It&#8217;s a lightweight <a href="http://en.wikipedia.org/wiki/Object-relational_mapping">Object-Relational Mapper</a> based on the Data Mapper design pattern, setup using one mapper per table.  The primary goal is to make database access one of the easiest parts of building your application instead of the most tedious, and for PHP DataMapper itself to have no dependencies outside the default PHP5 installation so it can be used anywhere, in any application (no frameworks required!).</p>
<p>The project itself hasn&#8217;t changed too much recently, but I decided to finally formally introduce this project because I finally got some time to write some decent documentation on how to use PHP DataMapper in in your own application.  Head on over to the <a href="http://phpdatamapper.com">PHP DataMapper</a> page to check it out, or just get right into the good stuff with the <a href="http://phpdatamapper.com/documentation/getting-started/">Getting Started</a> tutorial or the  <a href="http://phpdatamapper.com/documentation/usage/finders/">Usage &#8211; Finders</a> example.</p>
<p>More updates and documentation will be coming soon.  If you&#8217;re interested in learning more about the project or contributing, please <a href="http://groups.google.com/group/phpdatamapper">join the Google Group</a>.</p>
<p><strong>UPDATE:</strong> Links have been updated to the new home for the project &#8211; <a href="http://phpdatamapper.com">phpdatamapper.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/introducing-php-datamapper/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Early Performance Benchmarking is a Disease</title>
		<link>http://www.vancelucas.com/blog/early-performance-benchmarking-is-a-disease/</link>
		<comments>http://www.vancelucas.com/blog/early-performance-benchmarking-is-a-disease/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 19:46:19 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[benchmarking]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[profiling]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=114</guid>
		<description><![CDATA[Benchmarking and performance concerns should be one of the last things you address while building your application, but it seems as though, in the PHP community especially, it&#8217;s often one of the first things novice developers think about.
Any PHP developer who&#8217;s been in the community for a while has heard preposterous claims like &#8220;use single [...]]]></description>
			<content:encoded><![CDATA[<p>Benchmarking and performance concerns should be one of the <em>last</em> things you address while building your application, but it seems as though, in the PHP community especially, it&#8217;s often one of the <em>first</em> things novice developers think about.</p>
<p>Any PHP developer who&#8217;s been in the community for a while <a href="http://reinholdweber.com/?p=3">has heard</a> preposterous claims like &#8220;use single quotes (&#8216;) for strings instead of double quotes (&#8220;), because it&#8217;s faster&#8221;.  That is, faster over the 100,000 or so iterations it took the tester to generate a number sufficiently large enough to justify the claim, with a particular version of PHP, in a particular development environment in which it was tested.<span id="more-114"></span></p>
<p>These articles are then followed up with <a href="http://www.chazzuka.com/blog/?p=163">other</a> <a href="http://blogs.digitss.com/php/php-performance-improvement-tips/">posts</a> that only serve to perpetuate and solidify the original and invalid performance claims.  Articles like these are like a plague to the PHP community, spreading around and steering novice developers in the wrong direction, concerning them with the wrong things.  Chris Vincent recently released <a href="http://www.phpbench.com/">PHPBench.com</a> &#8211; a website that benchmarks chunks of related PHP code against each other to compare the speeds.  His goal was just a simple discovery of what code is actually fastest, and although it does yield a few interesting results, I have to wonder if it even matters.  If the tests prove anything at all, it&#8217;s that the specific syntax you choose <em>doesn&#8217;t</em> matter.  Why? Because it shows that newer PHP versions (he runs it on PHP 5.2+ where most of the previous articles were based on PHP 4.x) have been corrected and optimized to fix any performance discrepencies that there may have been in the past.  In the &#8220;double (&#8220;) vs. single (&#8216;) quotes&#8221; test, Chris concludes:</p>
<blockquote><p>&#8220;In today&#8217;s versions of PHP it looks like this argument has been satisfied on both sides of the line. Lets all join together in harmony in this one!&#8221;</p></blockquote>
<p>Similarly, the differences in the &#8220;echo vs. print&#8221; and &#8220;for vs. while&#8221; tests are so close in speed (and again remember, this is over 1,000 iterations) that you&#8217;re just better off using which ever one is a better fit the for job you&#8217;re doing.</p>
<h3>Optimize for Performance AFTER You Code</h3>
<p>The true way to optimize your code to run faster is to worry about optimization <em>after</em> you code.  This is, of course, because the <em>real </em>bottlenecks in your code can only be identified <em>after</em> the code is already written.  When put into simplified steps, the development and optimization process would then look something like this:</p>
<ol>
<li>Write code</li>
<li>Run it for a while until you (or your users) start to experience noticeable slowdowns or you begin to reach the capacity of the hardware you&#8217;re running on</li>
<li><a href="http://www.sitepoint.com/blogs/2007/04/23/faster-php-apps-profile-your-code-with-xdebug/">Profile</a> <a href="http://devzone.zend.com/article/2899-Profiling-PHP-Applications-With-xdebug">your</a> <a href="http://www.pseudocoder.com/archives/2007/04/24/how-to-really-use-xdebug-to-speed-up-your-app/">code</a> to identify where the <em>real </em>bottlenecks are</li>
<li>Re-factor and make adjustments to your code to fix those bottlenecks</li>
<li>Go back to step 2</li>
</ol>
<p>Now that&#8217;s not to say that performance concerns should be <em>completely</em> discarded when writing your code &#8211; experienced developers will automatically make code and design decisions based on their experience that will have a beneficial impact on performance while they&#8217;re writing the code.  This just means that it should never be your <em>primary </em>focus when developing your application, and that you should never be overly concerned about it until it&#8217;s actually a problem.</p>
<h3>The Impact on Your Code</h3>
<p>So the real difference here is that when you listen to benchmarks and have performance as a high priority immediately, you end up making bad design decisions and waste time worrying and doing things that may not even affect performance at all in the end.  So instead, <em>focus on your users</em>, and do what you can to make their lives easier, no matter what you think ahead of time the performance impact may be.  If it becomes a problem in the future, you can turn your focus to the specific problem and fix your code where the problems actually are.</p>
<h3>Conclusion</h3>
<p>Put aside your worries about performance and <strong>just build it</strong>.  Would you rather have 10,000 users using a website with performance problems that you have to fix or 100 users using a website that is half as useful but runs 10% faster because you spent all your time focusing on performance &#8220;tips&#8221; when they may not even have an impact on performance at all?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/early-performance-benchmarking-is-a-disease/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Presentation Slides From Tulsa TechFest 2008</title>
		<link>http://www.vancelucas.com/blog/presentation-slides-from-tulsa-techfest-2008/</link>
		<comments>http://www.vancelucas.com/blog/presentation-slides-from-tulsa-techfest-2008/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 18:22:44 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Speaking Engagements]]></category>
		<category><![CDATA[datamaper]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[speaking]]></category>
		<category><![CDATA[tulsatechfest]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=95</guid>
		<description><![CDATA[Well Tulsa TechFest is over, and it was a pretty good conference overall. Here are the slides of my presentations at the conference for those who are interested.  I have voice recordings of both my presentations too, but unfortunately the digital recorder I bought has no way of directly accessing the files stored in [...]]]></description>
			<content:encoded><![CDATA[<p>Well Tulsa TechFest is over, and it was a pretty good conference overall. Here are the slides of my presentations at the conference for those who are interested.  I have voice recordings of both my presentations too, but unfortunately the digital recorder I bought has no way of directly accessing the files stored in memory to move or copy them to a computer.  It just has a line in/out like the old cassette recorders.  What&#8217;s the point in making a digital recorder if there&#8217;s no USB cable or anything to get directly to the files?  Huh Sony?  Anyways &#8211; I didn&#8217;t have the cable required to re-record the audio on my computer, so I&#8217;ll probably pick one up and make videos of these presentations a little while later.  But for now, you can at least enjoy the slides.<span id="more-95"></span></p>
<h3>Procedural to Object-Oriented: The Benefits of Using Object-Oriented PHP</h3>
<p>The first presentation of mine was about object-oriented PHP programming, focusing on the many benefits it offers over a more procedural style of programming that seems to be very common in the PHP community.</p>
<div id="__ss_655193" style="width: 425px; text-align: left;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=phpproceduraltooo-1223916926352814-8&amp;rel=0&amp;stripped_title=php-procedural-to-objectoriented-presentation" /><embed type="application/x-shockwave-flash" width="425" height="355" src="http://static.slideshare.net/swf/ssplayer2.swf?doc=phpproceduraltooo-1223916926352814-8&amp;rel=0&amp;stripped_title=php-procedural-to-objectoriented-presentation" allowscriptaccess="always" allowfullscreen="true"></embed></object><small><a href="http://www.slideshare.net/vlucas/php-procedural-to-objectoriented-presentation?type=powerpoint">View on Slideshare.com</a></small></div>
<h3>Building a Data Mapper with PHP5 and the Standard PHP Library</h3>
<p>And my second &#8220;surprise&#8221; presentation was on my <a href="http://www.vancelucas.com/phpdatamapper">PHP DataMapper</a> project, and the steps and thought processes I went through while building it.  I say &#8220;surprise&#8221; here because another presenter had dropped out due to a scheduling conflict, and I found out I was going to be doing a second presentation in his time slot the day before the conference.  Surprise!</p>
<div id="__ss_655192" style="width: 425px; text-align: left;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=buildingdatamapperphp5-1223916824528552-8&amp;rel=0&amp;stripped_title=building-data-mapper-php5-presentation" /><embed type="application/x-shockwave-flash" width="425" height="355" src="http://static.slideshare.net/swf/ssplayer2.swf?doc=buildingdatamapperphp5-1223916824528552-8&amp;rel=0&amp;stripped_title=building-data-mapper-php5-presentation" allowscriptaccess="always" allowfullscreen="true"></embed></object><small><a href="http://www.slideshare.net/vlucas/building-data-mapper-php5-presentation?type=powerpoint">View on Slideshare.com</a></small></div>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/presentation-slides-from-tulsa-techfest-2008/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Reading a FeedBurner Feed with PHP and cURL</title>
		<link>http://www.vancelucas.com/blog/reading-a-feedburner-feed-with-php-and-curl/</link>
		<comments>http://www.vancelucas.com/blog/reading-a-feedburner-feed-with-php-and-curl/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 15:21:23 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[feedburner]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=80</guid>
		<description><![CDATA[Just thought I&#8217;d post a quick HOW-TO article on how to get the contents of a FeedBurner feed with PHP, because it&#8217;s something I was attempting to do last night that really annoyed me.  Since I started this blog here, I decided to narrow another website of mine &#8211; czaries.net &#8211; to just distribute some [...]]]></description>
			<content:encoded><![CDATA[<p>Just thought I&#8217;d post a quick HOW-TO article on how to get the contents of a FeedBurner feed with PHP, because it&#8217;s something I was attempting to do last night that really annoyed me.  Since I started this blog here, I decided to narrow another website of mine &#8211; <a href="http://www.czaries.net">czaries.net</a> &#8211; to just distribute some PHP scripts I&#8217;ve made and take down the news that was there.  I replaced it with a short paragraph explanation and a feed of the recent blog posts here.  The problem was, the feed wasn&#8217;t displaying, and I couldn&#8217;t figure out why.<br />
<span id="more-80"></span><br />
I visited the feed URL in my browser, and viola &#8211; the XML feed content was there.  I double-checked the URL in PHP, and it was the same, but I was getting a 404 error instead.  Odd.  Turns out, viewing a FeedBurner feed requires the presence of a USER-AGENT string (The string that identifies the operating system, browser, and language of your computer).  So the solution is to use <a href="http://us2.php.net/manual/en/ref.curl.php">PHP&#8217;s cURL library</a> to send a USER-AGENT string along with the request, like so:</p>
<p><code></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// URL location of your feed</span>
<span style="color: #000088;">$feedUrl</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://feeds.feedburner.com/VanceLucas?format=xml&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$feedContent</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Fetch feed from URL</span>
<span style="color: #000088;">$curl</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #000088;">$feedUrl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span> CURLOPT_TIMEOUT<span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span> CURLOPT_FOLLOWLOCATION<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span> CURLOPT_HEADER<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// FeedBurner requires a proper USER-AGENT...</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span> CURL_HTTP_VERSION_1_1<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span> CURLOPT_ENCODING<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;gzip, deflate&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span> CURLOPT_USERAGENT<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$feedContent</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Did we get feed content?</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$feedContent</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$feedContent</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
	<span style="color: #000088;">$feedXml</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #990000;">simplexml_load_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$feedContent</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$feedXml</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;h2&gt;From The Blog...&lt;/h2&gt;
	&lt;ul&gt;
	  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$feedXml</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">channel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;li style=&quot;padding:4px 0;&quot;&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/li&gt;
	  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;/ul&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p></code><br />
The code above gets the feed contents and then displays a nice summary of all the headlines in an unordered list with links using <a href="http://us2.php.net/manual/en/ref.simplexml.php">SimpleXML</a>.  Feel free to replace the USER-AGENT string with your own, or simply leave it as-is.  The current one is for Windows XP and Firefox 3.03.  You can get your own USER-AGENT string from a phpinfo() call towards the bottom of the page in the environment variables section.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/reading-a-feedburner-feed-with-php-and-curl/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
