<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 06 Jan 2009 02:17:56 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Larry Garfield's Blog: Benchmarking magic]]></title>
      <guid>http://www.phpdeveloper.org/news/9005</guid>
      <link>http://www.phpdeveloper.org/news/9005</link>
      <description><![CDATA[<p>
<i>Larry Garfield</i> has <a href="http://www.garfieldtech.com/blog/magic-benchmarks">put together some benchmarks</a> based around a request he had from other developers (the "performance czars") as to how the magic functions in PHP5 would perform in the new environment.
</p>
<blockquote>
Already, there is talk of how, and if, to leverage PHP 5's object handling now that we don't need to deal with the weirdness of PHP 4's object model. Of course, because it's Drupal, our army of performance czars want to know just what the cost is for object handling, and especially advanced object magic like __get(), __call(), the ArrayAccess interface, and so forth.
</blockquote>
<p>
He an <a href="http://www.garfieldtech.com/blog/magic-benchmarks">his tests</a> on a Thinkpad (Intel Core2 Duo 2.2Ghz) running Kubuntu and PHP 5.2.3. They were run two million times benchmarking the different methods for:
<ul>
<li>function calls 
<li>__call
<li>__get
<li>__set
<li>iterators (array)
<li>inheritance
<li>composition
</ul>
<p>
His results are listed at the <a href="http://www.garfieldtech.com/blog/magic-benchmarks">end of the post</a>.
</p>]]></description>
      <pubDate>Thu, 08 Nov 2007 12:04:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Travis Swicegood's Blog: Why Inheritance Sucks]]></title>
      <guid>http://www.phpdeveloper.org/news/8826</guid>
      <link>http://www.phpdeveloper.org/news/8826</link>
      <description><![CDATA[<p>
<i>Travis Swicegood</i> has made two <a href="http://www.travisswicegood.com/index.php/2007/10/11/why_class_inheritance_sucks">blog</a> <a href="http://www.travisswicegood.com/index.php/2007/10/11/title_12">posts</a> about his agreement with other statements made about why class inheritance sucks.
</p>
<p>
From the <a href="http://www.berniecode.com/writing/inheritance/">original comments</a> made by <i>Bernard Sumption</i>:
</p>
<blockquote>
All of the pain caused by inheritance can be traced back to the fact that inheritance forces 'is-a' rather than 'has-a' relationships. If class R2Unit extends Droid, then a R2Unit is-a Droid. If class Jedi contains an instance variable of type Lightsabre, then a Jedi has-a Lightsabre.
</blockquote>
<p>
<i>Travis</i> <a href="http://www.travisswicegood.com/index.php/2007/10/11/why_class_inheritance_sucks">agrees</a> and then comes back with his <a href="http://www.travisswicegood.com/index.php/2007/10/11/title_12">second post</a> to clarify something - composition versus inheritance:
</p>
<blockquote>
I approach OOP from a flexibility standpoint with one of its biggest flex-points being loose coupling which in turn promotes reusability. I'm going to use Event as a hypothetical example.
</blockquote>
<p>
He uses Events and design pattern illustrations (like the Visitor and Observer) to help illustrate his point.
</p>]]></description>
      <pubDate>Fri, 12 Oct 2007 10:11:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Nefarious Designs: Object-Oriented PHP Part 2: Relationships]]></title>
      <guid>http://www.phpdeveloper.org/news/6100</guid>
      <link>http://www.phpdeveloper.org/news/6100</link>
      <description><![CDATA[<p>
Nefarious Designs has posted <a href="http://nefariousdesigns.co.uk/archive/2006/08/object-oriented-php-part-2-relationships/">part two</a> of their look at the object-oriented functionality, this time, there's a focus on the relationships objects and their friends have.
</p>
<blockquote>
<p>
Following on from my posts "Object-Oriented Concepts" and "Object-Oriented Javascript", I'm going to take a look at OOP in PHP.
</p>
In "Part 1: Definition" we took a look at defining objects and classes in PHP. In part 2 I'm going to look at the most important part of any object-oriented system - the relationships.
</p>
</blockquote>
<p>
They <a href="http://nefariousdesigns.co.uk/archive/2006/08/object-oriented-php-part-2-relationships/">look at</a> inheritance, association, aggregation, and references. Code examples are sprinkled liberally to help illustrate the points.
</p>]]></description>
      <pubDate>Mon, 21 Aug 2006 18:06:29 -0500</pubDate>
    </item>
  </channel>
</rss>
