<?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>Thu, 20 Jun 2013 01:20:05 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Ibuildings Blog: Accessing object properties by reference]]></title>
      <guid>http://www.phpdeveloper.org/news/10114</guid>
      <link>http://www.phpdeveloper.org/news/10114</link>
      <description><![CDATA[<p>
On the Ibuildings blog today, <i>Harrie Verveer</i> has <a href="http://www.ibuildings.com/blog/archives/951-Accessing-object-properties-by-reference.html">posted about</a> an interesting quirk he found when working with objects and references:
</p>
<blockquote>
PHP is a loosely typed language. Most of the time this is very useful because you as a programmer don't have to worry about typecasting: it's done for you. However, on some occasions this can cause some unexpected trouble. [...] In this blog I want to point out what can happen if you try to access object properties by reference when the object is not initialized.
</blockquote>
<p>
<a href="http://www.ibuildings.com/blog/archives/951-Accessing-object-properties-by-reference.html">His example</a> shows the problem when it tries to grab a value from an array in a non-existent object by reference. It results in a dyanamically created object (of that type) with an empty array inside of it. It only works when you grab it by reference, but he shares a tip or two about how you can prevent hard to track down issues like this.
</p>]]></description>
      <pubDate>Mon, 05 May 2008 14:38:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jeff Moore's Blog: Why is PHP Code Considered Hard to Maintain?]]></title>
      <guid>http://www.phpdeveloper.org/news/6680</guid>
      <link>http://www.phpdeveloper.org/news/6680</link>
      <description><![CDATA[<p>
In his <a href="http://www.procata.com/blog/archives/2006/11/09/why-is-php-code-considered-hard-to-maintain/">latest blog entry</a>, <i>Jeff Moore</i> tries to dispel a rumor about PHP code that's been floating around for years now - that it's considered hard to maintain.
</p>
<blockquote>
The technocrat, heavily invested in his own technical prowess, faced with successful yet technically inferior code experiences cognitive dissonance. The only thing to do is to belittle the successful, but surely offensive code. "I could write better code than this," he says, or "this code sucks," or "this is unmaintainable."
</blockquote>
<p>
Unfortunately, what <i>Jeff</i> says about many programmer's first introduction to PHP is right - that they download a popular application to check it out. This code is not always, shall we say, stellar. <i>Jeff</i> also <a href="http://www.procata.com/blog/archives/2006/11/09/why-is-php-code-considered-hard-to-maintain/">brings up the point</a> that the "PHP doesn't scale" myth goes hand in hand with this. After all, the larger the application, the larger the code, right? And the larger the code, the less maintainable it is, right?
</p>
<p>
Of course not - there are wonderful large PHP applications that are as easy to jump into and add/modify functionality to and keep up to date as there are small. PHP has one major thing going for it - it's simple nature lets developers keep things simple, and simple is good.
</p>]]></description>
      <pubDate>Fri, 10 Nov 2006 07:34:00 -0600</pubDate>
    </item>
  </channel>
</rss>
