<?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: PHP 5 Will Make You A Better PHP Programmer</title>
	<atom:link href="http://blog.mattmecham.com/2008/10/03/php-5-will-make-you-a-better-php-programmer/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mattmecham.com/2008/10/03/php-5-will-make-you-a-better-php-programmer/</link>
	<description>A utopia of randomness from a bloke who develops internet software and is also a dad</description>
	<lastBuildDate>Thu, 26 Jan 2012 07:08:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Gindi Bar Yahav</title>
		<link>http://blog.mattmecham.com/2008/10/03/php-5-will-make-you-a-better-php-programmer/comment-page-1/#comment-7187</link>
		<dc:creator>Gindi Bar Yahav</dc:creator>
		<pubDate>Tue, 13 Jan 2009 10:32:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mattmecham.com/?p=221#comment-7187</guid>
		<description>Althouh i am new in programing, i have background from C# before i started PHP too... i can say to you that yesterday when i read about the &quot;magic&quot; functions i was in a little shock... how can i put it?
when in C# i can do a :

public int var1
and themn i can &quot;set&quot; and &quot;get&quot; him, in PHP its like the opposite, becuse the magic function work only when the varible is undefined (that what i understand...) and again, the constuact was so anoying.. i used to give the constractor the name of the class so... i really dont get it why i need to use constract ... but its like you said, PHP 5 is very good and  i happy to use it.</description>
		<content:encoded><![CDATA[<p>Althouh i am new in programing, i have background from C# before i started PHP too&#8230; i can say to you that yesterday when i read about the &#8220;magic&#8221; functions i was in a little shock&#8230; how can i put it?<br />
when in C# i can do a :</p>
<p>public int var1<br />
and themn i can &#8220;set&#8221; and &#8220;get&#8221; him, in PHP its like the opposite, becuse the magic function work only when the varible is undefined (that what i understand&#8230;) and again, the constuact was so anoying.. i used to give the constractor the name of the class so&#8230; i really dont get it why i need to use constract &#8230; but its like you said, PHP 5 is very good and  i happy to use it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith</title>
		<link>http://blog.mattmecham.com/2008/10/03/php-5-will-make-you-a-better-php-programmer/comment-page-1/#comment-7174</link>
		<dc:creator>Keith</dc:creator>
		<pubDate>Sat, 08 Nov 2008 04:36:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mattmecham.com/?p=221#comment-7174</guid>
		<description>It will be nice to get my hands on IPB 3 to start on IP.Tracker 2.  I have a Java/C# background from before I started doing PHP programming.  I have missed abstraction classes dearly as well the more OOP tools Java and C# have to offer (public, private, protected ... things you have mentioned).

Not quite sure I understand the &#039;Magic&#039; methods.  I saw the examples on the PHP site, so I understand what they can do.  May actually be one of my big hang-ups.  I like giving my constructors the name of the class ... not &#039;__construct&#039;.  &#039;__get&#039; and &#039;__set&#039; seem pointless because I&#039;d set the variables the class needs and provide get/set methods for those.  A programmer could make a new object from a class and throw a bunch of random data into that class&#039;s data array using the get/sets even if the methods of that class don&#039;t do anything with that data (that&#039;s the PHP example showed).

I&#039;m going to have to read up on this more.  I definitely like the looks of it and the potential, but I&#039;m going to have some hang-ups with it just like I do with PHP4.</description>
		<content:encoded><![CDATA[<p>It will be nice to get my hands on IPB 3 to start on IP.Tracker 2.  I have a Java/C# background from before I started doing PHP programming.  I have missed abstraction classes dearly as well the more OOP tools Java and C# have to offer (public, private, protected &#8230; things you have mentioned).</p>
<p>Not quite sure I understand the &#8216;Magic&#8217; methods.  I saw the examples on the PHP site, so I understand what they can do.  May actually be one of my big hang-ups.  I like giving my constructors the name of the class &#8230; not &#8216;__construct&#8217;.  &#8216;__get&#8217; and &#8216;__set&#8217; seem pointless because I&#8217;d set the variables the class needs and provide get/set methods for those.  A programmer could make a new object from a class and throw a bunch of random data into that class&#8217;s data array using the get/sets even if the methods of that class don&#8217;t do anything with that data (that&#8217;s the PHP example showed).</p>
<p>I&#8217;m going to have to read up on this more.  I definitely like the looks of it and the potential, but I&#8217;m going to have some hang-ups with it just like I do with PHP4.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lewis</title>
		<link>http://blog.mattmecham.com/2008/10/03/php-5-will-make-you-a-better-php-programmer/comment-page-1/#comment-7171</link>
		<dc:creator>Lewis</dc:creator>
		<pubDate>Tue, 21 Oct 2008 09:03:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mattmecham.com/?p=221#comment-7171</guid>
		<description>Although PHP5 does introduce lots of magic niceties, you&#039;ve got to be careful not to over-rely on them. They can be slow, see: http://www.garfieldtech.com/blog/magic-benchmarks

Also, for the problem you faced there, you may find inheritance to be better suited. Basically your subclass would inherit from the parent class, and shared functions would be stored in the parent class, then you&#039;d initiate the subclass through a static function stored in the parent class. This also allows you to set a standard set of functions in the parent class (see &#039;Implements&#039;) and makes it more obvious to developers what function calls are.

Using magic is handy, but it also hides a lot of things under its sleeves, and when you&#039;re coding you want to make things as clear as possible.</description>
		<content:encoded><![CDATA[<p>Although PHP5 does introduce lots of magic niceties, you&#8217;ve got to be careful not to over-rely on them. They can be slow, see: <a href="http://www.garfieldtech.com/blog/magic-benchmarks" rel="nofollow">http://www.garfieldtech.com/blog/magic-benchmarks</a></p>
<p>Also, for the problem you faced there, you may find inheritance to be better suited. Basically your subclass would inherit from the parent class, and shared functions would be stored in the parent class, then you&#8217;d initiate the subclass through a static function stored in the parent class. This also allows you to set a standard set of functions in the parent class (see &#8216;Implements&#8217;) and makes it more obvious to developers what function calls are.</p>
<p>Using magic is handy, but it also hides a lot of things under its sleeves, and when you&#8217;re coding you want to make things as clear as possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Don Wilson</title>
		<link>http://blog.mattmecham.com/2008/10/03/php-5-will-make-you-a-better-php-programmer/comment-page-1/#comment-7157</link>
		<dc:creator>Don Wilson</dc:creator>
		<pubDate>Sat, 04 Oct 2008 02:33:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mattmecham.com/?p=221#comment-7157</guid>
		<description>Glad to see you&#039;re using the MVC model for 3, I&#039;ve started using the model at the start of the summer and couldn&#039;t love it more.</description>
		<content:encoded><![CDATA[<p>Glad to see you&#8217;re using the MVC model for 3, I&#8217;ve started using the model at the start of the summer and couldn&#8217;t love it more.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

