<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Faking late static binding in PHP</title>
	<atom:link href="http://www.coderholic.com/faking-late-static-binding-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.coderholic.com/faking-late-static-binding-in-php/</link>
	<description>Addicted to Development</description>
	<lastBuildDate>Thu, 09 Sep 2010 00:50:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Ben</title>
		<link>http://www.coderholic.com/faking-late-static-binding-in-php/comment-page-1/#comment-9868</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Thu, 10 Jun 2010 13:24:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.coderholic.com/?p=328#comment-9868</guid>
		<description>Hi Robert,

The echo example is clearly over simplistic. The point isn&#039;t to echo a string, it is to demonstrate that the static method in the base class is aware of the name of the class on which the method was invoked.

Late Static Binding is useful in lots of situations, but not being available in PHP before 5.3 this &quot;fake&quot; approach allows you to do something similar. A practical example would be a Singleton base class with a static getInstance method, that returns an instance of an implementing base class.

I hope that explains it a little better!

Thanks, Ben</description>
		<content:encoded><![CDATA[<p>Hi Robert,</p>
<p>The echo example is clearly over simplistic. The point isn&#8217;t to echo a string, it is to demonstrate that the static method in the base class is aware of the name of the class on which the method was invoked.</p>
<p>Late Static Binding is useful in lots of situations, but not being available in PHP before 5.3 this &#8220;fake&#8221; approach allows you to do something similar. A practical example would be a Singleton base class with a static getInstance method, that returns an instance of an implementing base class.</p>
<p>I hope that explains it a little better!</p>
<p>Thanks, Ben</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://www.coderholic.com/faking-late-static-binding-in-php/comment-page-1/#comment-9741</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Wed, 02 Jun 2010 14:14:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.coderholic.com/?p=328#comment-9741</guid>
		<description>How can you even call this a fake LSB? Do you have any idea what you are talking about? How is this fake LSB useful in any way? Can you give us an example? Why don&#039;t you use

# echo &quot;class0&quot;;
# echo &quot;class1&quot;;
# echo &quot;class2&quot; ;

That&#039;s much more easier. Can you show us an example usage of this getName() method?</description>
		<content:encoded><![CDATA[<p>How can you even call this a fake LSB? Do you have any idea what you are talking about? How is this fake LSB useful in any way? Can you give us an example? Why don&#8217;t you use</p>
<p># echo &#8220;class0&#8243;;<br />
# echo &#8220;class1&#8243;;<br />
# echo &#8220;class2&#8243; ;</p>
<p>That&#8217;s much more easier. Can you show us an example usage of this getName() method?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.coderholic.com/faking-late-static-binding-in-php/comment-page-1/#comment-6108</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Wed, 18 Nov 2009 23:04:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.coderholic.com/?p=328#comment-6108</guid>
		<description>Hi Daniel,

The last example is a PHP5.3 example, which makes use of get_called_class method,  part of the LSB additions. The example is there to show how we can achieve what we want in PHP5.3

The example before that is how I propose to &quot;fake&quot; LSB in PHP pre 5.3. Sorry if that wasn&#039;t clear enough.

Thanks, Ben</description>
		<content:encoded><![CDATA[<p>Hi Daniel,</p>
<p>The last example is a PHP5.3 example, which makes use of get_called_class method,  part of the LSB additions. The example is there to show how we can achieve what we want in PHP5.3</p>
<p>The example before that is how I propose to &#8220;fake&#8221; LSB in PHP pre 5.3. Sorry if that wasn&#8217;t clear enough.</p>
<p>Thanks, Ben</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.coderholic.com/faking-late-static-binding-in-php/comment-page-1/#comment-6106</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Wed, 18 Nov 2009 22:46:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.coderholic.com/?p=328#comment-6106</guid>
		<description>Wait, so you aren&#039;t using the static keyword (http://php.net/manual/en/language.oop5.late-static-bindings.php) because 5.3 isn&#039;t widely available, so instead you use get_called_class() to emulate the static keyword, despite the fact that get_called_class() is a php 5.3 function only?</description>
		<content:encoded><![CDATA[<p>Wait, so you aren&#8217;t using the static keyword (<a href="http://php.net/manual/en/language.oop5.late-static-bindings.php" rel="nofollow">http://php.net/manual/en/language.oop5.late-static-bindings.php</a>) because 5.3 isn&#8217;t widely available, so instead you use get_called_class() to emulate the static keyword, despite the fact that get_called_class() is a php 5.3 function only?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
