<?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, 23 May 2013 04:39:36 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[DZone.com: Closure Object Binding in PHP 5.4]]></title>
      <guid>http://www.phpdeveloper.org/news/17054</guid>
      <link>http://www.phpdeveloper.org/news/17054</link>
      <description><![CDATA[<p>
In a new post to DZone.com <i>Mitchell Pronschinske</i> looks at <a href="http://css.dzone.com/articles/closure-object-binding-php-54">closure object binding</a> in PHP 5.4 applications (yes, we know PHP 5.4 isn't released yet). He explains what this is an shows some sample use cases for you to consider in your development.
</p>
<blockquote>
For the people who read PHP's NEWS file, it's no surprise - but for all who don't here's is probably one of the biggest features of PHP 5.4: Closure Object Support is back. For me it's something I missed the most, when Closures were introduced in PHP 5.3. So I'm very happy, that's finally here (or back). I'm going to tell you about the rocky road which closure object binding support had and show you some simple use cases for it.
</blockquote>
<p>
The functionality, based on <a href="https://wiki.php.net/rfc/closures/object-extension">this RFC</a>, lets you more correctly bind closures to objects instead of having to pass the objects into the closure at create time. He includes an example from a <a href="http://silex.sensiolabs.org/">Silex</a> framework application and <a href="https://gist.github.com/1121233">an example</a> that refactors a helper method as a part of rendering a simple template.
</p>]]></description>
      <pubDate>Fri, 28 Oct 2011 08:43:26 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Eric Hogue's Blog: Late Static Binding]]></title>
      <guid>http://www.phpdeveloper.org/news/16235</guid>
      <link>http://www.phpdeveloper.org/news/16235</link>
      <description><![CDATA[<p>
<i>Eric Hogue</i> has a <a href="http://erichogue.ca/2011/04/14/late-static-binding/">recent post to his blog</a> looking at one of the more tricky aspects of the latest versions of PHP (the 5.3.x series) - late static binding. In a nutshell, late static binding (LSB) lets static classes and methods work more correctly than before. <i>Eric</i> gets into a bit more detail than that:
</p>
<blockquote>
It came out almost 2 years ago, but it to me that many programmers around me have no idea about it. Myself, I have learned about it around 6 months ago. The PHP documentation defines late static binding as a way to "reference the called class in a context of static inheritance." This definition didn't really help me the first time I read it. Fortunately, there are more explanations in the documentation, and there are good examples. If you haven't, you should read it.
</blockquote>
<p>
To clarify, he includes a code snippet showing the use of the "static" keyword to correctly reference a static method. He also includes in interesting bit about when's a good time to use it.
</p>]]></description>
      <pubDate>Fri, 22 Apr 2011 09:14:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Alexey Zakhlestins' Blog: GObject for PHP (new bindings project)]]></title>
      <guid>http://www.phpdeveloper.org/news/15954</guid>
      <link>http://www.phpdeveloper.org/news/15954</link>
      <description><![CDATA[<p>
In a <a href="http://blog.milkfarmsoft.com/2011/02/gobject-for-php-new-bindings-project/">new post</a> <i>Alexey Zakhlestins</i> talks about a project he's been working on, a part of the split up with PHP-GTK out into separate projects. His part of the group is GObject with has now been <a href="https://github.com/indeyets/gobject-for-php">moved over to github</a>.
</p>
<blockquote>
This new PHP extension is called "GObject for PHP", so, my main concern, obviously is building comfortable bridge between GObject objects and PHP's objects. It starts to work, but there's a lot of stuff to be done. Please join the project, if you are interested. We need more hands!
</blockquote>
<p>
He describes some of the features already in the library - counterparts for parts of the current GObject world in PHP including GType, GSignal and GParamSpec. This is all on the master branch. In his "introspection" branch he's working on the <a href="http://live.gnome.org/GObjectIntrospection">introspection idea</a> the GNOME community has been working towards too.
</p>]]></description>
      <pubDate>Thu, 24 Feb 2011 08:25:23 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[C7Y: Late Static Binding: a practical example]]></title>
      <guid>http://www.phpdeveloper.org/news/9617</guid>
      <link>http://www.phpdeveloper.org/news/9617</link>
      <description><![CDATA[<p>
<i>Sean Coates</i> has <a href="http://c7y.phparch.com/c/entry/1/art,late_static_bindings">posted a new article</a> today about one of the features that will be included in the next major release of PHP (5.3) - late static bindings.
</p>
<blockquote>
Late Static Binding (LSB) is a topic that's been brought up numerous times in the past three years in various PHP development discussion circles (and we're finally getting it in PHP 5.3)'"but what does it really do, and why should you care? Here's a simple practical example of how it can greatly simplify your code's design.
</blockquote>
<p>
He <a href="http://c7y.phparch.com/c/entry/1/art,late_static_bindings">shows its usefulness</a> in an example of how it works, letting classes/objects access static methods, constants and properties of inherited classes (besides their own). His example (using beer, of course) shows how an extended class (Ale) can reference the constant (NAME) in the parent class (Beer). Thanks to a new keyword in PHP 5.3 - "static::" - helps define the difference even clearer.
</p>
<p>
Check out <a href="http://c7y.phparch.com/c/entry/1/art,late_static_bindings/1">the rest</a> of the article for a more practical usage too.
</p>]]></description>
      <pubDate>Tue, 12 Feb 2008 15:52:36 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Joshua Thompson's Blog: Return to Prototype Based Programming in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/8947</guid>
      <link>http://www.phpdeveloper.org/news/8947</link>
      <description><![CDATA[<p>
Taking full advantage of the upcoming features in the PHP 5.3.x series (and in PHP6 for that matter), <i>Joshua Thompson</i> has <a href="http://personal.schmalls.com/2007/10/29/return-to-prototype-based-programming-in-php/">come up with a way</a> to accomplish some prototype-based programming in a PHP application:
</p>
<blockquote>
With the implementation of the get_called_class() function in PHP, prototype based programming in PHP is possible. The new function is in both PHP5.3 and PHP6 <a href="http://snaps.php.net/">snapshots</a>. So, I went back to the drawing board and came up with a fully capable class. The $this keyword is usable, as well as being able to use the self, parent, and static (new with the <a href="http://www.ds-o.com/archives/65-Late-static-binding....sorta.html">late static binding patch</a>) keywords. 
</blockquote>
<p>
<a href="http://en.wikipedia.org/wiki/Prototype-based_programming">Prototype-based programming</a> is (basically) a method where classes aren't prebuilt. Instead they are created on the fly based on other objects and interfaces. <i>Joshua</i>'s <a href="http://personal.schmalls.com/2007/10/29/return-to-prototype-based-programming-in-php/">post</a> is a huge code dump of a prototype class and an example of it in use, dynamically creating two methods and making the three objects available.
</p>]]></description>
      <pubDate>Wed, 31 Oct 2007 16:38:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Mike Lively's Blog: Late static binding....sorta :/]]></title>
      <guid>http://www.phpdeveloper.org/news/8741</guid>
      <link>http://www.phpdeveloper.org/news/8741</link>
      <description><![CDATA[<p>
<i>Mike Lively</i> is happy about one thing - that late static binding (<a href="http://www.colder.ch/news/08-24-2007/28/late-static-bindings-expl.html">definition</a>) has been committed and will be included with PHP 5.3. Unfortunately, <a href="http://www.ds-o.com/archives/65-Late-static-binding....sorta.html">he has a downside too</a>:
</p>
<blockquote>
The good news is late static binding has been introduced into head and looks like it will be merged into 5.3 before it is released. The horrible news is I really don't think the patch went as far as it needs to.
</blockquote>
<p>
He talks about the original intention of the functionality (flexible inheritance for static methods/properties/constants) and how it was implemented, but with one small issue - that "static will ALWAYS return the 'resolved' name of the class used to call the current function". He illustrates with a code example showing an extended class returning a static property.
</p>
<p>
He also mentions two suggestions to help fix this issue:
</p>
<ul>
<li>setting the behavior of parent:: such that it forwards the calling class through the next function call.
<li>introducing another scope [...] using a new keyword so parent:: could remain the same
</ul>]]></description>
      <pubDate>Thu, 27 Sep 2007 12:58:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Etienne Kneuss' Blog: Late Static Bindings Explained]]></title>
      <guid>http://www.phpdeveloper.org/news/8613</guid>
      <link>http://www.phpdeveloper.org/news/8613</link>
      <description><![CDATA[<p>
<i>Etienne Kneuss</i> has <a href="http://www.colder.ch/news/08-24-2007/28/late-static-bindings-expl.html">a new article</a> posted about and introducing a feature that will be implemented in PHP6 - late static bindings.
</p>
<blockquote>
Late Static Binding (LSB, yes, not LSD) is an OO feature that is meant to be implemented in PHP 6, and maybe even backported to PHP 5. This article will describe what LSB is, what problems it's supposed to solve and how. The patch this article talks about can be found here: <a href="http://patches.colder.ch/Zend/late_static_bindings_take6.patch?markup">late_static_bindings_take6.patch</a>
</blockquote>
<p>
<i>Etienne</i> <a href="http://www.colder.ch/news/08-24-2007/28/late-static-bindings-expl.html">explains</a> what they are and includes several code examples to show how they'll work. There's also a mention of "edge cases" where special circumstances might cause the script to fall back on the "magic" functions (__get, __post, etc).
</p>]]></description>
      <pubDate>Fri, 07 Sep 2007 14:26:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[LivePipe Blog: What PHP6 Actually Needs]]></title>
      <guid>http://www.phpdeveloper.org/news/7846</guid>
      <link>http://www.phpdeveloper.org/news/7846</link>
      <description><![CDATA[<p>
On the LivePipe blog, there's <a href="http://livepipe.net/blog/programming/what_php6_actually_needs">a whishlist</a> that <i>Ryan</i> has posted for some of the things he'd like to see in PHP6.
</p>
<p>His list consists of:</p>
<ul>
<li>Closures
<li>{ } is the new array()
<li>Parameter Collection in Functions
<li>Late Static Binding
<li>Backwards Compatibility
</ul>
<p>
Each is <a href="http://livepipe.net/blog/programming/what_php6_actually_needs">explained</a>, some with code to illustrate.
</p>]]></description>
      <pubDate>Tue, 15 May 2007 10:13:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: PHP 5 and Polymorphism]]></title>
      <guid>http://www.phpdeveloper.org/news/4946</guid>
      <link>http://www.phpdeveloper.org/news/4946</link>
      <description><![CDATA[From DevShed, there's <a href="http://www.devshed.com/c/a/PHP/PHP-5-and-Polymorphism/">a more advanced tutorial</a> that might interest PHP developers out there looking for more info on "polymorphism" for their apps.
<p>
<quote>
<i>
This article explains what polymorphism is and how it applies to object oriented design in particular. It also explains the pros and cons of polymorphism when working with certain versions of PHP.
</i>
</quote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/PHP-5-and-Polymorphism/">start with a definition</a> on the topic that doesn't seem to help much: "The occurrence of different forms, stages, or types in individual organisms or in organisms of the same species, independent of sexual variations." They do, however, follow that with what it means to programming: "...an interface or base class without regard to an object's concrete class." They also include a simple example (no code, that's later).
<p>
With that concept in place, they move to the next step - working with the example to create code that can be used as a reference point. They talk about using a switch to make the script respond differently to different inputs and the lack of "late binding" support in PHP5.]]></description>
      <pubDate>Tue, 07 Mar 2006 07:19:08 -0600</pubDate>
    </item>
  </channel>
</rss>
