<?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: You Used PHP to Write That?! &#8211; Uh yeah.</title>
	<atom:link href="http://lukewelling.com/2008/02/04/you-used-php-to-write-that-uh-yeah/feed/" rel="self" type="application/rss+xml" />
	<link>http://lukewelling.com/2008/02/04/you-used-php-to-write-that-uh-yeah/</link>
	<description>Just another nerd’s weblog</description>
	<lastBuildDate>Mon, 22 Mar 2010 07:21:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bysa</title>
		<link>http://lukewelling.com/2008/02/04/you-used-php-to-write-that-uh-yeah/comment-page-1/#comment-3134</link>
		<dc:creator>Bysa</dc:creator>
		<pubDate>Mon, 22 Mar 2010 07:21:53 +0000</pubDate>
		<guid isPermaLink="false">http://lukewelling.com/2008/02/04/you-used-php-to-write-that-uh-yeah/#comment-3134</guid>
		<description>hi
i had some knowledge with php and asp, but im not an advanced one. recently i decide to learn php in more depth. because i like open source and i see a lot of fans trying to make it better than before.
and im reading a book for it. i mean your book in 4edition
something that bother my mind is function names.
i want to know why functions (not all of them though) have no meaningful names in them? why they select a chop() name for a function?
another thing is naming abbreviations
for example if i want to work with files, i have: fread(), readfile(), fpassthru(),  file() functions. and as you see none of them tells you what they do if you are not familiar with them.

also for naming, some of them use &quot;file&quot; (like: readfile, file)  and some of them use &quot;f&quot; as abbreviations (like: fread(), fpassthru()) .

also for reading from file i have: fgets(), fgetss(), fgetcsv(). again, name tells you nothing. for example if you see fgetss() for the first time, you cant say what is the difference between fgets() or fgetss().

another problem i see in functions is name convention. for example we have file_exist() and filesize(). why in some function there is an underline between names and in some of them there isn&#039;t?
if i know some language like c or delphi, i expect when i use filesize(), there is a function name fileexist() or vice versa.

also i noticed that php still haven&#039;t got unicode support for function names and some others but asp had it a long time ago.

i know unicode support probably needs huge code to be implemented, so its not a big deal in my mind if php haven&#039;t got it since.
but names of function is a simple thing to fix and it should be straightforward for those who are going to learn php.

as far as i know, asp have a better naming and almost all of them gives you some idea about what they do.

i was a fan of php and when we debate with my friend, i was in php side and against asp.

the next thing that i couldnt figure out is new feature, i looked in changelog of php 5.3, and i see its now support for closures ans true anonymous functions, i know it has its use, but lets face it, doesnt something like this make our code much less readable?
i see an example about it in wikipedia:
function getAdder($x)
{
    return function ($y) use ($x) {
        return $x + $y;
    };
}
 
$adder = getAdder(8);
echo $adder(2); // prints &quot;10&quot;

and about C, yes it is heavily on C syntax, but php should not have filesize because C have no filesize at all as far as i know, so if we want to be like C, we should have file_size(). because C use underline in such a functions. example is file_exist()
all i read in programing source in computer science, they say one parameter for a good language is a good naming convention.
and for a language like php, i think its good to have a perfect naming convetion, i mean come on, its not hard to implement a good name for a function.
just like globals removed. or magic quotes that going to be removed.

if you say we should support backward compatibility, i say at least make these bad names an old feature, so they will be fixed in next versions. 

another thing is parameter order, for example when you work with strings we have to function,
explode:
array explode  (  string $delimiter  ,  string $string  [,  int $limit  ] )

and strtok:
string strtok  (  string $str  ,  string $delimiter  )

so which one? delimetter before string or after.

i know these are not such a big thing, but i think they can fix it very easily, i mean come on its just a function name.

these things that i see are bothering me, can someone please correct me if im wrong?
i hope i could make my mean clear.</description>
		<content:encoded><![CDATA[<p>hi<br />
i had some knowledge with php and asp, but im not an advanced one. recently i decide to learn php in more depth. because i like open source and i see a lot of fans trying to make it better than before.<br />
and im reading a book for it. i mean your book in 4edition<br />
something that bother my mind is function names.<br />
i want to know why functions (not all of them though) have no meaningful names in them? why they select a chop() name for a function?<br />
another thing is naming abbreviations<br />
for example if i want to work with files, i have: fread(), readfile(), fpassthru(),  file() functions. and as you see none of them tells you what they do if you are not familiar with them.</p>
<p>also for naming, some of them use &#8220;file&#8221; (like: readfile, file)  and some of them use &#8220;f&#8221; as abbreviations (like: fread(), fpassthru()) .</p>
<p>also for reading from file i have: fgets(), fgetss(), fgetcsv(). again, name tells you nothing. for example if you see fgetss() for the first time, you cant say what is the difference between fgets() or fgetss().</p>
<p>another problem i see in functions is name convention. for example we have file_exist() and filesize(). why in some function there is an underline between names and in some of them there isn&#8217;t?<br />
if i know some language like c or delphi, i expect when i use filesize(), there is a function name fileexist() or vice versa.</p>
<p>also i noticed that php still haven&#8217;t got unicode support for function names and some others but asp had it a long time ago.</p>
<p>i know unicode support probably needs huge code to be implemented, so its not a big deal in my mind if php haven&#8217;t got it since.<br />
but names of function is a simple thing to fix and it should be straightforward for those who are going to learn php.</p>
<p>as far as i know, asp have a better naming and almost all of them gives you some idea about what they do.</p>
<p>i was a fan of php and when we debate with my friend, i was in php side and against asp.</p>
<p>the next thing that i couldnt figure out is new feature, i looked in changelog of php 5.3, and i see its now support for closures ans true anonymous functions, i know it has its use, but lets face it, doesnt something like this make our code much less readable?<br />
i see an example about it in wikipedia:<br />
function getAdder($x)<br />
{<br />
    return function ($y) use ($x) {<br />
        return $x + $y;<br />
    };<br />
}</p>
<p>$adder = getAdder(8);<br />
echo $adder(2); // prints &#8220;10&#8243;</p>
<p>and about C, yes it is heavily on C syntax, but php should not have filesize because C have no filesize at all as far as i know, so if we want to be like C, we should have file_size(). because C use underline in such a functions. example is file_exist()<br />
all i read in programing source in computer science, they say one parameter for a good language is a good naming convention.<br />
and for a language like php, i think its good to have a perfect naming convetion, i mean come on, its not hard to implement a good name for a function.<br />
just like globals removed. or magic quotes that going to be removed.</p>
<p>if you say we should support backward compatibility, i say at least make these bad names an old feature, so they will be fixed in next versions. </p>
<p>another thing is parameter order, for example when you work with strings we have to function,<br />
explode:<br />
array explode  (  string $delimiter  ,  string $string  [,  int $limit  ] )</p>
<p>and strtok:<br />
string strtok  (  string $str  ,  string $delimiter  )</p>
<p>so which one? delimetter before string or after.</p>
<p>i know these are not such a big thing, but i think they can fix it very easily, i mean come on its just a function name.</p>
<p>these things that i see are bothering me, can someone please correct me if im wrong?<br />
i hope i could make my mean clear.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Woodwork &#187; Blog Archive &#187; You Use PHP to Troll WHOM?!</title>
		<link>http://lukewelling.com/2008/02/04/you-used-php-to-write-that-uh-yeah/comment-page-1/#comment-2815</link>
		<dc:creator>The Woodwork &#187; Blog Archive &#187; You Use PHP to Troll WHOM?!</dc:creator>
		<pubDate>Tue, 05 Feb 2008 16:08:58 +0000</pubDate>
		<guid isPermaLink="false">http://lukewelling.com/2008/02/04/you-used-php-to-write-that-uh-yeah/#comment-2815</guid>
		<description>[...] Welling, security analyst for OmniTI consulting and bestselling PHP author, puts in his perspective. I wrote this article before Luke, but notice the similarity from realizing the article is [...]</description>
		<content:encoded><![CDATA[<p>[...] Welling, security analyst for OmniTI consulting and bestselling PHP author, puts in his perspective. I wrote this article before Luke, but notice the similarity from realizing the article is [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

