<?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>Sat, 18 May 2013 15:38:29 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPBuilder.com: Three Advanced Object-Oriented PHP Features You Need to Know ]]></title>
      <guid>http://www.phpdeveloper.org/news/14657</guid>
      <link>http://www.phpdeveloper.org/news/14657</link>
      <description><![CDATA[<p>
On PHPBuilder.com there's a <a href="http://www.phpbuilder.com/columns/Jason_Gilmore061510.php3">new article on OOP</a> in PHP applications, specifically some of the things that PHP5 has to offer you if you're not using it to its fullest potential.
</p>
<blockquote>
I'll introduce you to three of PHP's advanced object-oriented features which seem to not have garnered the attention they deserve. The topics discussed here should be useful whether you're a relative newcomer to object-oriented development and are looking to expand your knowledge, or have a background using languages such as Java or C# and are trying to learn more about what PHP has to offer.
</blockquote>
<p>
These three things he introduces are Reflection (PHP's <a href="http://us2.php.net/reflection">API for introspection</a> of code), the SPL (Standard PHP Library) set of objects and tools and a more recent addition - late static binding.
</p>]]></description>
      <pubDate>Wed, 16 Jun 2010 09:13:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Giorgio Sironi's Blog: The dangers of Late Static Bindings]]></title>
      <guid>http://www.phpdeveloper.org/news/14346</guid>
      <link>http://www.phpdeveloper.org/news/14346</link>
      <description><![CDATA[<p>
<i>Giorgio Sironi</i> has a new post that <a href="http://giorgiosironi.blogspot.com/2010/04/dangers-of-late-static-bindings.html">warns you of the dangers</a> that could come from the use of a technology just recently introduced to PHP - late static binding.
</p>
<blockquote>
There's a lot of (justified) excitement about <a href="http://php.net/">PHP</a> 5.3 new features, such as the support of namespaces and anonymous functions. Though, some glittering capabilities of the language are definitely not gold: the goto statement is probably the most debated example, but also the long-awaited Late Static Bindings support is an hammer which may hurt your fingers...
</blockquote>
<p>
He talks about how two of the characteristics of late static binding - the fact that it involves something being static and that there's a sort of hierarchy involved. He gives a code example of how it could be used and notes that static functions should be used sparingly since they are a more procedural way of doing things.
</p>
<p>
The post also includes a good example - an abstract Factory method - and a bad example - Active Record that doesn't evolve towards a Repository pattern being used.
</p>]]></description>
      <pubDate>Wed, 14 Apr 2010 07:06:41 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brandon Savage's Blog: A Lesson In Static Methods And Late Static Binding]]></title>
      <guid>http://www.phpdeveloper.org/news/14334</guid>
      <link>http://www.phpdeveloper.org/news/14334</link>
      <description><![CDATA[<p>
<i>Brandon Savage</i> in his frustrations with the Zend Framework and the "self" keyword in PHP has written up a new post showing how <a href="http://www.brandonsavage.net/a-lesson-in-static-methods-and-late-static-binding/">you can use late static binding</a> to work around it.
</p>
<blockquote>
he problem is, when extended, My_Auth::getInstance() still returns an instance of Zend_Auth. The solution was to duplicate the static method in my My_Auth class, which worked properly. What did I get as a return value? Zend_Auth [...] Why didn't I get an instance of My_Auth instead of Zend_Auth? Well, that's because PHP determines the meaning of the self keyword at compile time, meaning that when you call a function that makes use of it later, you'll get whatever it's been defined to mean when it was compiled.
</blockquote>
<p>
To remedy the situation he uses <a href="http://php.net/manual/en/language.oop5.late-static-bindings.php">late static binding</a> (in PHP 5.3+) by using the "static" keyword like you would use "self" to refer correctly to the current class, not the class it sees at runtime.
</p>]]></description>
      <pubDate>Mon, 12 Apr 2010 11:10:51 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jordi Boggiano's Blog: Multiton base class]]></title>
      <guid>http://www.phpdeveloper.org/news/11641</guid>
      <link>http://www.phpdeveloper.org/news/11641</link>
      <description><![CDATA[<p>
In <a href="http://seld.be/notes/multiton-base-class">this recent post</a> <i>Jordi Boggiano</i> looks at a different sort of design pattern - a sort of extension of the Singleton pattern: Multition.
</p>
<blockquote>
While I like the <a href="http://en.wikipedia.org/wiki/Singleton_pattern">Singleton</a> pattern every now and then, I prefer the flexibility that the <a href="http://en.wikipedia.org/wiki/Multiton">Multiton</a> potentially offers, and well it's just an extended version of the Singleton, so it's "compatible" with the Singleton model. Anyway, to the point, PHP5.3 is coming, and with Late Static Binding you can do a base Multiton (or Singleton if you insist), which wasn't possible before. Now I like this very much because you can simply extend it rather than rewriting those (few, I know, but still) lines each time. 
</blockquote>
<p>
Included in <a href="http://seld.be/notes/multiton-base-class">the post</a> is an example of the design pattern showing how to create its structure in the class and use it to grab the same or unique instances (defined with an ID).
</p>]]></description>
      <pubDate>Tue, 30 Dec 2008 11:17:49 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP.net: PHP 5.3 alpha 1 Released]]></title>
      <guid>http://www.phpdeveloper.org/news/10735</guid>
      <link>http://www.phpdeveloper.org/news/10735</link>
      <description><![CDATA[<p>
As <a href="http://www.php.net/index.php#id2008-08-01-1">announced on the PHP.net site</a> today, the first alpha version of the much-anticipated PHP 5.3 has been released - <a href="http://downloads.php.net/johannes/">PHP 5.3 alpha 1</a>.
</p>
<blockquote>
The PHP development team is proud to announce the <a href="http://downloads.php.net/johannes/">first alpha release</a> (Windows binaries will appear in the next few days) of the upcoming minor version update of PHP. The new version PHP 5.3 is expected to improve stability and performance as well as add new language syntax and extensions. Several new features have already been documented in the <a href="http://php.net/docs.php">official documentation</a>, others are listed on the <a href="http://wiki.php.net/doc/scratchpad/upgrade/53">wiki</a> in preparation of getting documented. Please also review the <a href="http://php.net/php5news">NEWS</a> file.
</blockquote>
<p>
Among the list of new features/improvements are things like namespaces, late static binding, lambda functions, closures, support for mysqlnd and removal of support for pre-Windows 2000 systems. For more information on when the full stable version will his the web, check out <a href="http://wiki.php.net/todo/php53">the release plan</a>.
</p>]]></description>
      <pubDate>Fri, 01 Aug 2008 07:58:29 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Mike Lively's Blog: Late Static Binding (LSB) forward_static_call()]]></title>
      <guid>http://www.phpdeveloper.org/news/9939</guid>
      <link>http://www.phpdeveloper.org/news/9939</link>
      <description><![CDATA[<p>
On his blog, <i>Mike Lively</i> has <a href="http://www.ds-o.com/archives/69-Late-Static-Binding-LSB-forward_static_call.html">posted a look</a> at some of the work he's been doing on patches for the late static binding functionality to be included in PHP, including an example of the updates in action.
</p>
<blockquote>
This weekend I wrapped up a few small tests and sent the patch in and it was subsequently pushed to <a href="http://www.ds-o.com/exit.php?url_id=193&entry_id=69">php 5.3 and php 6.0</a>. Now, this is not at all the way I wanted things to work, in all honesty I think the patch is pretty hokey but unfortunately nobody really spoke up in support of the changes I wanted to make to parent:: in regards to LSB.
</blockquote>
<p>
His example shows how to override a static method and push that new method's execution to the parent class (in two ways - safe using forward_static_call and the not so safe calling itself with a parent:: override).
</p>]]></description>
      <pubDate>Wed, 09 Apr 2008 11:24:19 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Antony Dovgal's Blog: 5.3 snapshots are available]]></title>
      <guid>http://www.phpdeveloper.org/news/9718</guid>
      <link>http://www.phpdeveloper.org/news/9718</link>
      <description><![CDATA[<p>
<i>Antony Dovgal</i> <a href="http://daylessday.org/archives/14-5_3-snapshots-are-available.html">points out</a> that <i>Derick Rethans</i> has added the snapshots for PHP 5.3 to the <a href="http://snaps.php.net/">snaps.php.net</a> website.
</p>
<blockquote>
Short list of what you can find there: Namespaces, __callstatic() magic method, accessing static members through $foo::myFunc(), fully rewritten ini-parser with .htaccess-like user defined ini files for CGI/FastCGI, improved OpenSSL extension, PCRE 7.4, and other fixes and improvements that will never get into 5_2 branch.
</blockquote>
<p>
He recommends <a href="http://daylessday.org/archives/14-5_3-snapshots-are-available.html">teching throughly</a> before the major release to find all of the bug before the general public does. Builds for both <a href="http://snaps.php.net/php5.3-200802281130.tar.gz">source</a> and <a href="http://snaps.php.net/win32/php5.3-win32-200802201330.zip">Windows</a> systems have been posted.
</p>]]></description>
      <pubDate>Thu, 28 Feb 2008 09:33:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Mike Lively's Blog: Late Static Binding - Changes to parent]]></title>
      <guid>http://www.phpdeveloper.org/news/9112</guid>
      <link>http://www.phpdeveloper.org/news/9112</link>
      <description><![CDATA[<p>
<i>Mike Lively</i> has <a href="http://www.ds-o.com/archives/68-Late-Static-Binding-Changes-to-parent.html">shared some of his thoughts</a> on the late static binding functionality that will be in the upcoming PHP 5.3 - specifically the relationships of parents and children it has.
</p>
<blockquote>
I won't rehash all of the arguments as you can quite easily find out my full thoughts by previous posts and on that mailing list thread. To put it simply I feel that somehow there needs to be a way to call methods in a parent class without losing the ability to reference back to the original called static.
</blockquote>
<p>
He gives an example of what he's talking about (code) and, to help further his cause he's <a href="http://www.ds-o.com/exit.php?url_id=185&entry_id=68">created</a> <a href="http://www.ds-o.com/exit.php?url_id=186&entry_id=68">three</a> <a href="http://www.ds-o.com/exit.php?url_id=187&entry_id=68">patches</a> to make it work how he'd like.
</p>]]></description>
      <pubDate>Mon, 26 Nov 2007 09:37:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gergely Hodicska's Blog: What is new in PHP 5.3 - part 2: late static binding]]></title>
      <guid>http://www.phpdeveloper.org/news/9048</guid>
      <link>http://www.phpdeveloper.org/news/9048</link>
      <description><![CDATA[<p>
<i>Gergely Hodicska</i> has <a href="http://blog.felho.hu/what-is-new-in-php-53-part-2-late-static-binding.html">posted part two</a> of his look at the upcoming PHP 5.3 release. In his <a href="http://www.phpdeveloper.org/news/9040">previous post</a>, he looked at namespacing, but in this new one he covers late static binding (<a href="http://livedocs.phpdoc.info/manual/en/language.oop5.late-static-bindings.php">mor einfo here</a>).
</p> 
<blockquote>
In the second part we will deal with static late binding, which is a very exciting new feature in PHP 5.3 and which promise some really nifty code. :) This topic attracted attention after <a href="http://www.phparch.com/webcasts/player/Main_content.php?p=L3RyYWluaW5nL3NsaWRlcy9aRkNBU1QvcmVjb3JkaW5ncy9yZWNvcmQuZmx2>Zend's webcast</a> about the <a href="http://framework.zend.com/">Zend Framework</a>. There was a little outcry in the PHP blogosphere, that the ActiveRecord examples presented in this webcast can't work in PHP even with the version 5.2. Now with late static binding it is possible to implement this style of ActiveRecord almost correctly.
</blockquote>
<p>
His post is <a href="http://blog.felho.hu/what-is-new-in-php-53-part-2-late-static-binding.html">an example</a> of implementing the ActiveRecord (sort of) pattern, complete with code examples.
</p>]]></description>
      <pubDate>Thu, 15 Nov 2007 07:57:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gergely Hodicska's Blog: What's new in PHP 5.3 - part 1: namespaces]]></title>
      <guid>http://www.phpdeveloper.org/news/9040</guid>
      <link>http://www.phpdeveloper.org/news/9040</link>
      <description><![CDATA[<p>
<i>Gergely Hodicska</i> has started a mini-series of posts centering about what's going to be coming in the next major release of PHP, version 5.3. The <a href="http://blog.felho.hu/whats-new-in-php-53-part-1-namespaces.html">first article</a> has been posted today focusing on one of the more popular topics - namespaces.
</p>
<blockquote>
In my previous post I mentioned that PHP 5.3 will be released in early 2008 so I think it's just in time to talk about the features of this version. [...] The big gun features are namespaces, late static binding and mysqlnd, but there are other interesting improvements, for example __callStatic, dynamic static calls. In this part of this series we are going to analyze namespaces in detail.
</blockquote>
<p>
Included in the post are a "before" and "after" example of namspacing in a PHP application, code examples of namespaces in action, simple porting of current PHP 5.2 applications up to 5.3 and working with __autoload and Reflection.
</p>]]></description>
      <pubDate>Wed, 14 Nov 2007 12:50:00 -0600</pubDate>
    </item>
  </channel>
</rss>
