<?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面试题</title>
	<atom:link href="http://www.toplee.com/blog/610.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.toplee.com/blog/610.html</link>
	<description>活到老，学到老 ...   @ IT，业界，互联网</description>
	<lastBuildDate>Wed, 03 Mar 2010 13:58:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Michael</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-3#comment-31779</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Tue, 13 Oct 2009 04:13:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-31779</guid>
		<description>[Comment ID #31778 Will Be Quoted Here]

我这样回复你，岂不是替他们打广告了？ 嘿嘿

我就用蹦心的广告来回复你吧，那个cs的地方在这里： http://www.bengxin.com/shop/391586.html?f=998</description>
		<content:encoded><![CDATA[<blockquote class='comment_quote'><p><a href="http://www.toplee.com/blog/610.html#comment-31778" title="Click here to view the original comment"><em>ninstein on October 13, 2009 at 10:52 am said:</em></a></p>
<p>呵呵 博主的胡子照是在哪里CS拍的？</p></blockquote>
<p>我这样回复你，岂不是替他们打广告了？ 嘿嘿</p>
<p>我就用蹦心的广告来回复你吧，那个cs的地方在这里： <a href="http://www.bengxin.com/shop/391586.html?f=998" rel="nofollow">http://www.bengxin.com/shop/391586.html?f=998</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ninstein</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-3#comment-31778</link>
		<dc:creator>ninstein</dc:creator>
		<pubDate>Tue, 13 Oct 2009 02:52:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-31778</guid>
		<description>呵呵 博主的胡子照是在哪里CS拍的？</description>
		<content:encoded><![CDATA[<p>呵呵 博主的胡子照是在哪里CS拍的？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leetman</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-2#comment-31685</link>
		<dc:creator>leetman</dc:creator>
		<pubDate>Mon, 24 Aug 2009 01:53:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-31685</guid>
		<description>[Comment ID #31103 Will Be Quoted Here]
大哥那个是叫引号吗（输出语句后面）？</description>
		<content:encoded><![CDATA[<blockquote class='comment_quote'><p><a href="http://www.toplee.com/blog/610.html#comment-31103" title="Click here to view the original comment"><em>justin on April 25, 2009 at 10:24 pm said:</em></a></p>
<p>第一題出的水平真是高，暗藏玄機啊！請各位注意輸出語句裏面的引號，注意用中文引號（半角）和英文引號的區&#8230;</p></blockquote>
<p>大哥那个是叫引号吗（输出语句后面）？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 小猪</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-2#comment-31603</link>
		<dc:creator>小猪</dc:creator>
		<pubDate>Sat, 08 Aug 2009 04:30:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-31603</guid>
		<description>[Comment ID #31103 Will Be Quoted Here]
说的好，我试了下，确实是有区别的。</description>
		<content:encoded><![CDATA[<blockquote class='comment_quote'><p><a href="http://www.toplee.com/blog/610.html#comment-31103" title="Click here to view the original comment"><em>justin on April 25, 2009 at 10:24 pm said:</em></a></p>
<p>第一題出的水平真是高，暗藏玄機啊！請各位注意輸出語句裏面的引號，注意用中文引號（半角）和英文引號的區&#8230;</p></blockquote>
<p>说的好，我试了下，确实是有区别的。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 纸黄金网</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-2#comment-31239</link>
		<dc:creator>纸黄金网</dc:creator>
		<pubDate>Mon, 01 Jun 2009 08:50:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-31239</guid>
		<description>没看题就是觉得博主的胡子好性感啊</description>
		<content:encoded><![CDATA[<p>没看题就是觉得博主的胡子好性感啊</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-2#comment-31110</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Tue, 28 Apr 2009 04:05:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-31110</guid>
		<description>提示一下，和全角半角没有关系。 :)</description>
		<content:encoded><![CDATA[<p>提示一下，和全角半角没有关系。 <img src='http://www.toplee.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justin</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-2#comment-31103</link>
		<dc:creator>justin</dc:creator>
		<pubDate>Sat, 25 Apr 2009 14:24:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-31103</guid>
		<description>第一題出的水平真是高，暗藏玄機啊！請各位注意輸出語句裏面的引號，注意用中文引號（半角）和英文引號的區別。</description>
		<content:encoded><![CDATA[<p>第一題出的水平真是高，暗藏玄機啊！請各位注意輸出語句裏面的引號，注意用中文引號（半角）和英文引號的區別。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Spirit_MLY</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-2#comment-30504</link>
		<dc:creator>Spirit_MLY</dc:creator>
		<pubDate>Thu, 04 Dec 2008 03:47:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-30504</guid>
		<description>第一个，if里面的判断，嘿嘿，因为$a = $b是赋值，如果$b非零，则if为真，否则为假；
第二个，考察的是数组中键，单引号与无引号的性能，当然是用单引号的性能会高于无引号的，因为无引号的，PHP会把它当成常量，找不到了再做键
第三个，不懂^_____^</description>
		<content:encoded><![CDATA[<p>第一个，if里面的判断，嘿嘿，因为$a = $b是赋值，如果$b非零，则if为真，否则为假；<br />
第二个，考察的是数组中键，单引号与无引号的性能，当然是用单引号的性能会高于无引号的，因为无引号的，PHP会把它当成常量，找不到了再做键<br />
第三个，不懂^_____^</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gabriel</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-2#comment-30155</link>
		<dc:creator>gabriel</dc:creator>
		<pubDate>Mon, 15 Sep 2008 06:53:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-30155</guid>
		<description>说得好。

我也有同样的想法，吸取ZF和ROR的简洁化，准备在SPRING上做同样的约定代替配置的工作。

ZF等真的成熟了再说吧。谢谢。看过你的大容量并发架构的博文，写的很好，获益非浅。</description>
		<content:encoded><![CDATA[<p>说得好。</p>
<p>我也有同样的想法，吸取ZF和ROR的简洁化，准备在SPRING上做同样的约定代替配置的工作。</p>
<p>ZF等真的成熟了再说吧。谢谢。看过你的大容量并发架构的博文，写的很好，获益非浅。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-2#comment-30154</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sun, 14 Sep 2008 17:18:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-30154</guid>
		<description>[Comment ID #30152 Will Be Quoted Here]

实话实说，纯粹的ZF框架，如果要用到商业的大型高并发应用上，还是不建议用，纯粹的ZF适合用在企业应用和网站的内部后台系统开发上，因为无论如何，不可想象一个大型应用会基于一个index.php来做Router和Rewrite

我应用的方法，更多的只是采用ZF的部分模块或者使用ZF的代码组织方式和编码风格，吸取长处的地方到具体的项目中。</description>
		<content:encoded><![CDATA[<blockquote class='comment_quote'><p><a href="http://www.toplee.com/blog/610.html#comment-30152" title="Click here to view the original comment"><em>gabriel on September 14, 2008 at 11:36 pm said:</em></a></p>
<p>Michael兄，</p>
<p>以前没有采用php，是因为企业应用，对分层要求比较高，所以没有使用php，&#8230;</p></blockquote>
<p>实话实说，纯粹的ZF框架，如果要用到商业的大型高并发应用上，还是不建议用，纯粹的ZF适合用在企业应用和网站的内部后台系统开发上，因为无论如何，不可想象一个大型应用会基于一个index.php来做Router和Rewrite</p>
<p>我应用的方法，更多的只是采用ZF的部分模块或者使用ZF的代码组织方式和编码风格，吸取长处的地方到具体的项目中。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gabriel</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-2#comment-30152</link>
		<dc:creator>gabriel</dc:creator>
		<pubDate>Sun, 14 Sep 2008 15:36:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-30152</guid>
		<description>Michael兄，

以前没有采用php，是因为企业应用，对分层要求比较高，所以没有使用php，但对php, ror一直抱有好感。如果没有使用ZF,php的性能还是可以接受的，基本上在java的70%，不是问题。

但是ZF目前的表现是在是不敢用。可能我什么地方配置有问题？不过ZF的配置确实十分简单啊。

今天我用spring mvc，做了同样的一个例子，在同样的硬件环境下做了同样的测试。
机器：DELL 笔记本，core 2, 1.73GHZ, 2G内存。
操作系统: WINDOWS
服务器：TOMCAT 6.0

禁止session,采用share nothing的路子，测试。结果如下：
10并发 1000笔时：每秒1800以上
100并发10000笔时：每秒1800左右
500并发10000笔时：每秒1400左右

写这个问题的目的确实是想得到一个ZF应用的性能答案。如果是可接受的范围，很想切换到ZF上，因为ZF开发确实方便。</description>
		<content:encoded><![CDATA[<p>Michael兄，</p>
<p>以前没有采用php，是因为企业应用，对分层要求比较高，所以没有使用php，但对php, ror一直抱有好感。如果没有使用ZF,php的性能还是可以接受的，基本上在java的70%，不是问题。</p>
<p>但是ZF目前的表现是在是不敢用。可能我什么地方配置有问题？不过ZF的配置确实十分简单啊。</p>
<p>今天我用spring mvc，做了同样的一个例子，在同样的硬件环境下做了同样的测试。<br />
机器：DELL 笔记本，core 2, 1.73GHZ, 2G内存。<br />
操作系统: WINDOWS<br />
服务器：TOMCAT 6.0</p>
<p>禁止session,采用share nothing的路子，测试。结果如下：<br />
10并发 1000笔时：每秒1800以上<br />
100并发10000笔时：每秒1800左右<br />
500并发10000笔时：每秒1400左右</p>
<p>写这个问题的目的确实是想得到一个ZF应用的性能答案。如果是可接受的范围，很想切换到ZF上，因为ZF开发确实方便。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-2#comment-30147</link>
		<dc:creator>Gabriel</dc:creator>
		<pubDate>Thu, 11 Sep 2008 11:29:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-30147</guid>
		<description>Michael兄，

有个ZF性能问题请教下，我以前是搞JAVA的，最近开始准备学习ZF。昨天刚刚下了ZF1.6，测试性能发现不是一般的差。你有没有这方面的测试数据。

安装环境：apache2.2, php5.2.6,xcache1.2.2
我按照ZF官网的例子Quickstart做了一个最简单的例子，不访问数据库，没有业务逻辑，就是输出一个&#039;hello world&#039;,只是走通了MVC的概念。然后用AB做了一个10个用户，1000笔请求的测试，结果吓我一跳。每秒请求数在13-15左右。

不用ZF，只写一个简单的hello.php，用AB做同样10*1000测试，每秒在1300，相差了将近100倍。

我检查了XCACHE，确认缓存是命中的。

有没有什么建议？谢谢。</description>
		<content:encoded><![CDATA[<p>Michael兄，</p>
<p>有个ZF性能问题请教下，我以前是搞JAVA的，最近开始准备学习ZF。昨天刚刚下了ZF1.6，测试性能发现不是一般的差。你有没有这方面的测试数据。</p>
<p>安装环境：apache2.2, php5.2.6,xcache1.2.2<br />
我按照ZF官网的例子Quickstart做了一个最简单的例子，不访问数据库，没有业务逻辑，就是输出一个&#8217;hello world&#8217;,只是走通了MVC的概念。然后用AB做了一个10个用户，1000笔请求的测试，结果吓我一跳。每秒请求数在13-15左右。</p>
<p>不用ZF，只写一个简单的hello.php，用AB做同样10*1000测试，每秒在1300，相差了将近100倍。</p>
<p>我检查了XCACHE，确认缓存是命中的。</p>
<p>有没有什么建议？谢谢。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-2#comment-30115</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Thu, 04 Sep 2008 23:25:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-30115</guid>
		<description>[Comment ID #30114 Will Be Quoted Here]

:) 高！</description>
		<content:encoded><![CDATA[<blockquote class='comment_quote'><p><a href="http://www.toplee.com/blog/610.html#comment-30114" title="Click here to view the original comment"><em>ju on September 4, 2008 at 2:44 pm said:</em></a></p>
<p>呵呵，machael<br />
奇怪我不会PHP竟然也能回答上来头两道&#8230;</p></blockquote>
<p> <img src='http://www.toplee.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  高！</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ju</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-1#comment-30114</link>
		<dc:creator>ju</dc:creator>
		<pubDate>Thu, 04 Sep 2008 06:44:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-30114</guid>
		<description>呵呵，machael
奇怪我不会PHP竟然也能回答上来头两道...</description>
		<content:encoded><![CDATA[<p>呵呵，machael<br />
奇怪我不会PHP竟然也能回答上来头两道&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xiaodouban</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-1#comment-30099</link>
		<dc:creator>xiaodouban</dc:creator>
		<pubDate>Fri, 29 Aug 2008 06:42:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-30099</guid>
		<description>哈哈，真nb，虽然没玩过php，对php的语法不属悉，但是这两个题目mao似还能答上来，可能是我c学得太好了。</description>
		<content:encoded><![CDATA[<p>哈哈，真nb，虽然没玩过php，对php的语法不属悉，但是这两个题目mao似还能答上来，可能是我c学得太好了。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeff</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-1#comment-30098</link>
		<dc:creator>jeff</dc:creator>
		<pubDate>Fri, 29 Aug 2008 06:32:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-30098</guid>
		<description>1.将b的值赋予a 因为b是null 所以else
2.这样写的话在警告没有打开的条件 不会出现提示错误的 anykey 只要没有定义成常量 效果一样 （节约了两个单引号） ：）
3.貌似这样没有什么好处吧 ：） curl更强大</description>
		<content:encoded><![CDATA[<p>1.将b的值赋予a 因为b是null 所以else<br />
2.这样写的话在警告没有打开的条件 不会出现提示错误的 anykey 只要没有定义成常量 效果一样 （节约了两个单引号） ：）<br />
3.貌似这样没有什么好处吧 ：） curl更强大</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: weird</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-1#comment-30094</link>
		<dc:creator>weird</dc:creator>
		<pubDate>Thu, 28 Aug 2008 14:32:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-30094</guid>
		<description>第一题
if ($a=$b)  printf(“a==b”); 
else  printf(“a!=b”)；
程序把$b赋值给$a，然后判断$a值~~~因为$=null 所以$a自然为false
第二题
不用多说~~~
第三题
open www.toplee.com 80     
get index.php HTTP/1.1</description>
		<content:encoded><![CDATA[<p>第一题<br />
if ($a=$b)  printf(“a==b”);<br />
else  printf(“a!=b”)；<br />
程序把$b赋值给$a，然后判断$a值~~~因为$=null 所以$a自然为false<br />
第二题<br />
不用多说~~~<br />
第三题<br />
open <a href="http://www.toplee.com" rel="nofollow">http://www.toplee.com</a> 80<br />
get index.php HTTP/1.1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: callaly</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-1#comment-30090</link>
		<dc:creator>callaly</dc:creator>
		<pubDate>Thu, 28 Aug 2008 03:23:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-30090</guid>
		<description>第二题可以查看PHP查考里数组的\&quot;数组做什么和不做什么\&quot;</description>
		<content:encoded><![CDATA[<p>第二题可以查看PHP查考里数组的\&#8221;数组做什么和不做什么\&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fanxiaowen</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-1#comment-30085</link>
		<dc:creator>fanxiaowen</dc:creator>
		<pubDate>Wed, 27 Aug 2008 03:55:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-30085</guid>
		<description>收了，以后拿这个去考一下师弟师妹</description>
		<content:encoded><![CDATA[<p>收了，以后拿这个去考一下师弟师妹</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: D</title>
		<link>http://www.toplee.com/blog/610.html/comment-page-1#comment-30084</link>
		<dc:creator>D</dc:creator>
		<pubDate>Wed, 27 Aug 2008 03:19:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.toplee.com/blog/?p=610#comment-30084</guid>
		<description>1 $a!=b. 其实是取决于B的值</description>
		<content:encoded><![CDATA[<p>1 $a!=b. 其实是取决于B的值</p>
]]></content:encoded>
	</item>
</channel>
</rss>
