<?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, 04 Dec 2008 12:53:05 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Typical Programmer Blog: Doing it wrong: getters and setters]]></title>
      <guid>http://www.phpdeveloper.org/news/10420</guid>
      <link>http://www.phpdeveloper.org/news/10420</link>
      <description><![CDATA[<p>
According to <a href="http://typicalprogrammer.com/?p=23">this new post</a> on the Typical Programmer blog, using getters and setters in your scripts only adds in a bit of unnecessary coupling and complexity to your scripts that you just don't need.
</p>
<blockquote>
Today most of the popular programming languages support objects, limiting scope, modularity, passing by value, and sophisticated built-in types. There should be no reason to deliberately expose an object's data to the rest of the code because the language can enforce encapsulation and data hiding.
</blockquote>
<p>
While not specific to PHP, <a href="http://typicalprogrammer.com/?p=23">the post</a> does recommend against them because of one simple reason common to all languages that make them possible - they "break the encapsulation OOP offers". For them, they're like a cheat to get around bad coding practices and are not needed to make a successful application work.
</p>]]></description>
      <pubDate>Mon, 16 Jun 2008 11:19:17 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Mike Naberezny's Blog: Symfony Templates and Ruby's ERb]]></title>
      <guid>http://www.phpdeveloper.org/news/4865</guid>
      <link>http://www.phpdeveloper.org/news/4865</link>
      <description><![CDATA[In his <a href="http://www.mikenaberezny.com/archives/40">latest blog entry</a>, <i>Mike Naberezny</i> takes a look at the <a href="http://symfony-project.com/">Symfony framework</a> and shares some of his opinions on it.
<p>
<quote>
<i>
One thing that I think Symfony gets right is that it appears to use partitioned PHP code for its templates, in the spirit of <a href="http://www.paul-m-jones.com/">Paul</a>'s <a href="http://www.phpsavant.com/">Savant</a> system.
<p>
I noticed in the Symfony demo that there is no separation of scope between variables passed to the template from the controller and local variables in the template. I'd like to see them scoped properly ("$this->products") but I can certainly understand why they did it this way. Using "$this->" in the template everywhere quickly gets messy.
</i>
</quote>
<p>
He <a href="http://www.mikenaberezny.com/archives/40">mentions</a> a few other items he saw as well, including a way to correct the above mentioned problem (two ways - one more single-instance, the other more global).]]></description>
      <pubDate>Wed, 20 Feb 2008 07:12:36 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Rails for PHP Developers: Three New Articles Posted (Scope, Variables & RegEx)]]></title>
      <guid>http://www.phpdeveloper.org/news/9659</guid>
      <link>http://www.phpdeveloper.org/news/9659</link>
      <description><![CDATA[<p>
<i>Mike Naberezny</i> has posted a few more articles to the "Rails for PHP Developers" website (based on <a href="http://www.pragprog.com/titles/ndphpr">this book</a>) covering some more of the basics.
</p>
<p>There's three new tutorials posted:</p>
<ul>
<li><a href="http://railsforphp.com/2008/02/18/ruby-block-scope/">Ruby Block Scope</a> - the basics of Ruby block scope, a common point of confusion for PHP developers new to Ruby. 
<li><a href="http://railsforphp.com/2008/02/13/variable-arguments/">Variable Arguments</a> - an article that shows two common API patterns found in Rails, variable arguments and option hashes, and how to implement them both in PHP. 
<li><a href="http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/">Regular Expressions in Ruby</a> - a useful reference that maps all of the common PHP regular expression functions to the equivalents in Ruby. 
</ul>
<p>
Check out the <a href="http://railsforphp.com/">rest of the site</a> for even more great content.
</p>]]></description>
      <pubDate>Tue, 19 Feb 2008 08:44:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: Lexical scope to appear in PHP?]]></title>
      <guid>http://www.phpdeveloper.org/news/9309</guid>
      <link>http://www.phpdeveloper.org/news/9309</link>
      <description><![CDATA[<>
In <a href="http://www.sitepoint.com/blogs/2007/12/23/lexical-scope-to-appear-in-php/">this new post</a> to the SitePoint PHP blog, <i>Troels Knak-Nielsen</i> talks about some of the advancements (and diagreements) that have happened around adding lexical scope to the create_function functionality.
</p>
<blockquote>
<p>
The main argument against approving the patch, seems to be, that one would expect static scoping rules to apply to the anonymous function. After all, this is the case in similar languages, which support anonymous functions. One could only assume, that changing PHP to support this, would be a major undertaking.
</p>
<p>
One would be wrong, it seems.
</p>
</blockquote>
<p>
<a href="http://news.php.net/php.internals/34216">A patch</a> has been made to add the functionality (from <i>Christian Seller</i>) adding a new keyword, lexical, to make it all work.
</p>]]></description>
      <pubDate>Tue, 25 Dec 2007 09:46:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Arnold Daniels' Blog: Perl like temporary variables in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/8961</guid>
      <link>http://www.phpdeveloper.org/news/8961</link>
      <description><![CDATA[<p>
<i>Arnold Daniels</i> <a href="http://blog.adaniels.nl/?p=58">points out</a> a quick method for creating what he calls "perl-like temporary variables" in the global scope of a script:
</p>
<blockquote>
When writing code in the global scope, I often have a problem where I'm overwriting a variable. This happens even more often when I work on code of somebody else. Usually has the variable which does the overwriting is usually just a temporary variable.
</blockquote>
<p>
<a href="http://blog.adaniels.nl/?p=58">His code</a> is a simple few lines that shows how it could be used when trying to write information out to a file handle. Some of the comments on the post criticize his use of the global scope but <i>Arnold</i> comes back with his reasoning - mostly that there is already code in the global scope and that adding something else is only adding to it, not making things worse.
</p>]]></description>
      <pubDate>Fri, 02 Nov 2007 09:38:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[I/O Reader: 15 Cool Things & 12 Things to Dislike About PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/8484</guid>
      <link>http://www.phpdeveloper.org/news/8484</link>
      <description><![CDATA[<p>
On the <a href="http://ioreader.com/">I/O Reader blog</a>, there's two different posts that take two sides of the spectrum when it comes to what to like and dislike about PHP, both lists of features of the the language:
</p>
<ul>
<li><a href="http://ioreader.com/2007/08/17/11-cool-things-about-php-that-most-people-overlook/">15 Cool Things About PHP That Most People Overlook</a> - a list including the Reflection API, the Standard PHP Library, type hinting and the "magic" functions.
<li><a href="http://ioreader.com/2007/08/19/12-things-you-should-dislike-about-php/">12 Things You Should Dislike About PHP</a> - this list includes things like naming conventions, that _tostring doesn't work as (he) expected, magic quotes and register globals and safe mode
</ul>
<p>
Both have their valid points and it's interesting to see how many of the points made in the first article he goes back on and mentions specific instances where it doesn't work as expected. Some of the comparisons seem a bit like he's comparing PHP to his experience in another language and not objectively on PHP's features alone.
</p>]]></description>
      <pubDate>Mon, 20 Aug 2007 08:32:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP 10.0 Blog: More inlining]]></title>
      <guid>http://www.phpdeveloper.org/news/6734</guid>
      <link>http://www.phpdeveloper.org/news/6734</link>
      <description><![CDATA[<p>
On the PHP 10.0 Blog, <i>Stas</i> <a href="http://php100.wordpress.com/2006/11/13/more-inlining/">talks more about</a> inlining in PHP functions - some of the bad things this time (see <a href="http://php100.wordpress.com/2006/10/16/inline-evals/">here</a> and <a href="http://php100.wordpress.com/2006/10/26/faster-better-assert/">here</a> for other comments), including things that could break an application if not handled correctly.
</p>
<blockquote>
Performance benefits from inlining simple functions might be significant, since function call in PHP is not cheap. We'd have some potential problems there.
</blockquote>
<p>
Included in the list are things like:
<ul>
<li>Variable scoping - we don't want function variables to mess with our scope, so we'd probably rename them or something.
<li>Then we might get a problem if function messing with current scope is called indirectly so we can't really know. 
<li>And then some may use end-of-scope for destruction of variables that have dtors, so when we'd clean up these variables?
</ul>
</p>]]></description>
      <pubDate>Mon, 20 Nov 2006 08:10:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Jonnay's Blog: PHP vs. Javascript: A shit vs. poo fight.]]></title>
      <guid>http://www.phpdeveloper.org/news/6493</guid>
      <link>http://www.phpdeveloper.org/news/6493</link>
      <description><![CDATA[<p>
Responding to <a href="http://www.phpdeveloper.org/news/6475">this commentary</a> from the SitePoint PHP Blog the other day, <i>Jonnay</i> has come up with <a href="http://blog.jonnay.net/archives/758-PHP-vs.-Javascript-A-shit-vs.-poo-fight..html">some of his own</a> thoughts on each of the topics mentioned.
</p>
<blockquote>
Apparently there was some kind of <a href="http://www.webtuesday.ch/meetings/20061010">PHP vs. Javascript fight</a>, to see which language sucked the most. The results? Amazingly Banal, if not downright wrong.
</blockquote>
<p>
Topics in each round of the fight included:
<ul>
<li>Syntax
<li>Standard Libraries
<li>Meta Programming
<li>Error Handling
<li>Garbage Collection
</ul>
<i>Jonnay</i> <a href="http://blog.jonnay.net/archives/758-PHP-vs.-Javascript-A-shit-vs.-poo-fight..html">comes back</a> with his (differing) perspectives on a few of the items - syntax, scope/namespaces/packaging, meta programming, AOP, and an overall commentary in which he reminds readers that defending either side isn't easy when the voting audience might not fully understand one language or the other.
</p>]]></description>
      <pubDate>Fri, 13 Oct 2006 07:38:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Tnx.nl: PHP in Contrast to Perl]]></title>
      <guid>http://www.phpdeveloper.org/news/5415</guid>
      <link>http://www.phpdeveloper.org/news/5415</link>
      <description><![CDATA[<p>
As long as people "choose sides" when it comes to programming languages, there will always be articles <a href="http://tnx.nl/php">like this</a> to compare them. This time, it's a look at PHP versus another much-loved language, Perl.
</p>
<p>
<a href="http://tnx.nl/php">The article</a> takes a look at several different topics under this one umbrella, including:
<ul>
<li>Arguments and return values are extremely inconsistent
<li>PHP has inconsistent function naming
<li>PHP has no lexical scope
<li>PHP has too many functions in the core
</ul>
</p>
<p>
Obviously, they all seem to take a negative slant on PHP, but they do provide some content under each of the headings to back up their claims. They break out the contents of each of these examples to make comparison of Perl's and PHP's similar functionality easier. At the end, they also provide links to other resources and other posters illustrating some of the points <a href="http://tnx.nl/php">they've shown</a>.
</p>]]></description>
      <pubDate>Mon, 22 May 2006 06:21:33 -0500</pubDate>
    </item>
  </channel>
</rss>
