<?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"
	>
<channel>
	<title>评论: Zend PHP5 认证考试研究之12: 附三</title>
	<atom:link href="http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/feed/langswitch_lang/zh/" rel="self" type="application/rss+xml" />
	<link>http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/langswitch_lang/zh/</link>
	<description>PHP、CSS、Ajax，网站开发和其他</description>
	<pubDate>Sat, 22 Nov 2008 07:50:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>作者: tjmcd1963</title>
		<link>http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/langswitch_lang/zh/#comment-1453</link>
		<dc:creator>tjmcd1963</dc:creator>
		<pubDate>Wed, 08 Oct 2008 17:31:45 +0000</pubDate>
		<guid isPermaLink="false">http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/#comment-1453</guid>
		<description>*The method used to create a new node to be added into an XML document using DOM is the ___________ method.
Ambiguous qestion as it fails to specify what kind of node.
e.g. the correct answer COULD be any of ...
DomDocument-&#62;create_cdata_section 
 — Creates new cdata node 
DomDocument-&#62;create_comment 
 — Creates new comment node 
DomDocument-&#62;create_element_ns 
 — Creates new element node with an associated namespace 
DomDocument-&#62;create_element 
 — Creates new element node 
DomDocument-&#62;create_processing_instruction 
 — Creates new PI node 
DomDocument-&#62;create_text_node 
 — Creates new text node
However I AM inclined to agree that 
  "DomDocument-&#62;create_element" is the answer they are looking for.</description>
		<content:encoded><![CDATA[<p>*The method used to create a new node to be added into an XML document using DOM is the ___________ method.<br />
Ambiguous qestion as it fails to specify what kind of node.<br />
e.g. the correct answer COULD be any of &#8230;<br />
DomDocument-&gt;create_cdata_section<br />
 — Creates new cdata node<br />
DomDocument-&gt;create_comment<br />
 — Creates new comment node<br />
DomDocument-&gt;create_element_ns<br />
 — Creates new element node with an associated namespace<br />
DomDocument-&gt;create_element<br />
 — Creates new element node<br />
DomDocument-&gt;create_processing_instruction<br />
 — Creates new PI node<br />
DomDocument-&gt;create_text_node<br />
 — Creates new text node<br />
However I AM inclined to agree that<br />
  &#8220;DomDocument-&gt;create_element&#8221; is the answer they are looking for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者: admin</title>
		<link>http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/langswitch_lang/zh/#comment-1446</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sun, 05 Oct 2008 06:27:20 +0000</pubDate>
		<guid isPermaLink="false">http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/#comment-1446</guid>
		<description>Um. Maybe you are right. But, actually, the purpose of my posts is not to tell which are the correct answers to the exam test. I just want to share some of my information to the users. I will be glad if these have any help for my readers :).

Personally, I think I will choose preg_*.</description>
		<content:encoded><![CDATA[<p>Um. Maybe you are right. But, actually, the purpose of my posts is not to tell which are the correct answers to the exam test. I just want to share some of my information to the users. I will be glad if these have any help for my readers :).</p>
<p>Personally, I think I will choose preg_*.</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者: tjmcd1963</title>
		<link>http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/langswitch_lang/zh/#comment-1445</link>
		<dc:creator>tjmcd1963</dc:creator>
		<pubDate>Sat, 04 Oct 2008 20:30:46 +0000</pubDate>
		<guid isPermaLink="false">http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/#comment-1445</guid>
		<description>Krzysztof Ryba Said,
"That’s my opinion and I would choose ereg"

...and Krzysztof makes a good arguement HOWEVER...
Having taken the practice test twice now (wherein the same question came up on both ocasions) where upon I did answer
"preg_* regular expression functions" and on both occasions I scored "EXCELENT" on the
String Manipulation and Regular Expressions section of the test.  That said, seeing as there were so few regex questions on either test, do you think it likely that I got it wrong twice and still scored EXCELLENT both times ????</description>
		<content:encoded><![CDATA[<p>Krzysztof Ryba Said,<br />
&#8220;That’s my opinion and I would choose ereg&#8221;</p>
<p>&#8230;and Krzysztof makes a good arguement HOWEVER&#8230;<br />
Having taken the practice test twice now (wherein the same question came up on both ocasions) where upon I did answer<br />
&#8220;preg_* regular expression functions&#8221; and on both occasions I scored &#8220;EXCELENT&#8221; on the<br />
String Manipulation and Regular Expressions section of the test.  That said, seeing as there were so few regex questions on either test, do you think it likely that I got it wrong twice and still scored EXCELLENT both times ????</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者: Andrés G. Montañez</title>
		<link>http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/langswitch_lang/zh/#comment-1428</link>
		<dc:creator>Andrés G. Montañez</dc:creator>
		<pubDate>Thu, 21 Aug 2008 01:51:01 +0000</pubDate>
		<guid isPermaLink="false">http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/#comment-1428</guid>
		<description>The question

"*In databases that do not support the AUTO_INCREMENT modifier, you must use a LAST_INSERT_ID(id+1) instead to auto-generate a numeric incrementing key."

I answered "sequence".  A sequence is a database object which stores a sequence of numbers (much like the auto_increment column), but must be called separatly.</description>
		<content:encoded><![CDATA[<p>The question</p>
<p>&#8220;*In databases that do not support the AUTO_INCREMENT modifier, you must use a LAST_INSERT_ID(id+1) instead to auto-generate a numeric incrementing key.&#8221;</p>
<p>I answered &#8220;sequence&#8221;.  A sequence is a database object which stores a sequence of numbers (much like the auto_increment column), but must be called separatly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者: Andrés G. Montañez</title>
		<link>http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/langswitch_lang/zh/#comment-1427</link>
		<dc:creator>Andrés G. Montañez</dc:creator>
		<pubDate>Wed, 20 Aug 2008 04:15:47 +0000</pubDate>
		<guid isPermaLink="false">http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/#comment-1427</guid>
		<description>Hi, in MySQL "LAST_INSERT_ID()" will return the last value of the AUTO_INCREMENT column. But, it can also return an expression: LAST_INSERT_ID(expr) in the case thath you don't have an auto_increment in the transaction (eg: updates, insert ... on duplicate key update).

So, the "+1 solution" would be something like this:
INSERT INTO table VALUES(LAST_INSERT_ID(SELECT MAX(id) + 1 FROM table), val1, val2).

In this case the call to the LAST_INSERT_ID is redundant, you could use the subquery result as the value to the insert:
INSERT INTO table VALUES((SELECT MAX(id) + 1 FROM table), val1, val2).

But, you have the possibility to put an expression in there (eg: a stored function which can return an unique -global- id for example).

I have scheduled the Zend Exam on Friday 29th, of this month!!
Wish me luck! :)

By the way, GREAT POSTS, very VERY helpful!</description>
		<content:encoded><![CDATA[<p>Hi, in MySQL &#8220;LAST_INSERT_ID()&#8221; will return the last value of the AUTO_INCREMENT column. But, it can also return an expression: LAST_INSERT_ID(expr) in the case thath you don&#8217;t have an auto_increment in the transaction (eg: updates, insert &#8230; on duplicate key update).</p>
<p>So, the &#8220;+1 solution&#8221; would be something like this:<br />
INSERT INTO table VALUES(LAST_INSERT_ID(SELECT MAX(id) + 1 FROM table), val1, val2).</p>
<p>In this case the call to the LAST_INSERT_ID is redundant, you could use the subquery result as the value to the insert:<br />
INSERT INTO table VALUES((SELECT MAX(id) + 1 FROM table), val1, val2).</p>
<p>But, you have the possibility to put an expression in there (eg: a stored function which can return an unique -global- id for example).</p>
<p>I have scheduled the Zend Exam on Friday 29th, of this month!!<br />
Wish me luck! <img src='http://readtheweb.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>By the way, GREAT POSTS, very VERY helpful!</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者: admin</title>
		<link>http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/langswitch_lang/zh/#comment-1420</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sun, 10 Aug 2008 12:40:49 +0000</pubDate>
		<guid isPermaLink="false">http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/#comment-1420</guid>
		<description>Which RDBMS are you using? If you refer to mysql, I think better use  mysql_insert_id().</description>
		<content:encoded><![CDATA[<p>Which RDBMS are you using? If you refer to mysql, I think better use  mysql_insert_id().</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者: Athanas</title>
		<link>http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/langswitch_lang/zh/#comment-1417</link>
		<dc:creator>Athanas</dc:creator>
		<pubDate>Sun, 03 Aug 2008 17:08:39 +0000</pubDate>
		<guid isPermaLink="false">http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/#comment-1417</guid>
		<description>*In databases that do not support the AUTO_INCREMENT modifier, you must use a LAST_INSERT_ID(id+1) instead to auto-generate a numeric incrementing key.

your answer is probably right, But I can't figure out how LAST_INSERT_ID is working
if I use that query

insert into member  (memid,name,firstname,email)
values(LAST_INSERT_ID()+1,'lname', 'fname', 'test@test.com')

LAST_INSERT_ID always return 0+1 unless I set SELECT LAST_INSERT_ID(1),LAST_INSERT_ID(2) and so on before each insert query.

could you explain how do you use it, or if you thing it has a better answer
thank you</description>
		<content:encoded><![CDATA[<p>*In databases that do not support the AUTO_INCREMENT modifier, you must use a LAST_INSERT_ID(id+1) instead to auto-generate a numeric incrementing key.</p>
<p>your answer is probably right, But I can&#8217;t figure out how LAST_INSERT_ID is working<br />
if I use that query</p>
<p>insert into member  (memid,name,firstname,email)<br />
values(LAST_INSERT_ID()+1,&#8217;lname&#8217;, &#8216;fname&#8217;, &#8216;test@test.com&#8217;)</p>
<p>LAST_INSERT_ID always return 0+1 unless I set SELECT LAST_INSERT_ID(1),LAST_INSERT_ID(2) and so on before each insert query.</p>
<p>could you explain how do you use it, or if you thing it has a better answer<br />
thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者: admin</title>
		<link>http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/langswitch_lang/zh/#comment-1110</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 13 Jun 2008 12:30:06 +0000</pubDate>
		<guid isPermaLink="false">http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/#comment-1110</guid>
		<description>Congratulations! :)</description>
		<content:encoded><![CDATA[<p>Congratulations! <img src='http://readtheweb.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>作者: Heena</title>
		<link>http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/langswitch_lang/zh/#comment-1107</link>
		<dc:creator>Heena</dc:creator>
		<pubDate>Fri, 13 Jun 2008 01:33:51 +0000</pubDate>
		<guid isPermaLink="false">http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/#comment-1107</guid>
		<description>hey i m now zend certified!!!

http://www.zend.com/store/education/certification/authenticate.php?ClientCandidateID=ZEND005514&#38;RegistrationID=225719929</description>
		<content:encoded><![CDATA[<p>hey i m now zend certified!!!</p>
<p><a href="http://www.zend.com/store/education/certification/authenticate.php?ClientCandidateID=ZEND005514&amp;RegistrationID=225719929" rel="nofollow">http://www.zend.com/store/education/certification/authenticate.php?ClientCandidateID=ZEND005514&amp;RegistrationID=225719929</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>作者: Krzysztof Ryba</title>
		<link>http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/langswitch_lang/zh/#comment-945</link>
		<dc:creator>Krzysztof Ryba</dc:creator>
		<pubDate>Sat, 05 Apr 2008 09:14:18 +0000</pubDate>
		<guid isPermaLink="false">http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/#comment-945</guid>
		<description>Hello,

It's no so obvious (as many other questions in MockExams, heh).
Page 89-90 of Zend PHP5 Certification Study Guide:

"Perl Compatible Regular Expressions (normally abbreviated as “PCRE”) offer a very
powerful string-matching and replacement mechanism that far surpasses anything
we have examined so far.
Regular expressions are often thought of as very complex—and they can be at
times. However, properly used they are relatively simple to understand and fairly
easy to use. Given their complexity, of course, they are also much more computationally
intensive than the simple search-and-replace functions we examined earlier in this chapter. "

And finally:

"Therefore, you should use them only when appropriate—that is,
when using the simpler functions is either impossible or so complicated that it’s not worth the effort."

Then, on http://pl.php.net/manual/en/ref.regex.php we can read:

"Tip

PHP also supports regular expressions using a Perl-compatible syntax using the PCRE functions. Those functions support non-greedy matching, assertions, conditional subpatterns, and a number of other features not supported by the POSIX-extended regular expression syntax."

and because of this complexity of PCRE the implementations of preg_ functions are much more complicated. That's why using them should be avoided if not necessary.

That's my opinion and I would choose ereg</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>It&#8217;s no so obvious (as many other questions in MockExams, heh).<br />
Page 89-90 of Zend PHP5 Certification Study Guide:</p>
<p>&#8220;Perl Compatible Regular Expressions (normally abbreviated as “PCRE”) offer a very<br />
powerful string-matching and replacement mechanism that far surpasses anything<br />
we have examined so far.<br />
Regular expressions are often thought of as very complex—and they can be at<br />
times. However, properly used they are relatively simple to understand and fairly<br />
easy to use. Given their complexity, of course, they are also much more computationally<br />
intensive than the simple search-and-replace functions we examined earlier in this chapter. &#8221;</p>
<p>And finally:</p>
<p>&#8220;Therefore, you should use them only when appropriate—that is,<br />
when using the simpler functions is either impossible or so complicated that it’s not worth the effort.&#8221;</p>
<p>Then, on <a href="http://pl.php.net/manual/en/ref.regex.php" rel="nofollow">http://pl.php.net/manual/en/ref.regex.php</a> we can read:</p>
<p>&#8220;Tip</p>
<p>PHP also supports regular expressions using a Perl-compatible syntax using the PCRE functions. Those functions support non-greedy matching, assertions, conditional subpatterns, and a number of other features not supported by the POSIX-extended regular expression syntax.&#8221;</p>
<p>and because of this complexity of PCRE the implementations of preg_ functions are much more complicated. That&#8217;s why using them should be avoided if not necessary.</p>
<p>That&#8217;s my opinion and I would choose ereg</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者: Piotr Lewandowski</title>
		<link>http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/langswitch_lang/zh/#comment-829</link>
		<dc:creator>Piotr Lewandowski</dc:creator>
		<pubDate>Sun, 03 Feb 2008 19:55:46 +0000</pubDate>
		<guid isPermaLink="false">http://readtheweb.info/2008/01/26/zend-php5-certification-exam-study-review-11-supplementary-iii/#comment-829</guid>
		<description>Question:
If regular expressions must be used, in general which type of regular expression functions available to PHP is preferred for performance reasons?

I think the answer is: preg_*

I found it in php manual:
Note: preg_match(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg(). 


http://uk3.php.net/ereg</description>
		<content:encoded><![CDATA[<p>Question:<br />
If regular expressions must be used, in general which type of regular expression functions available to PHP is preferred for performance reasons?</p>
<p>I think the answer is: preg_*</p>
<p>I found it in php manual:<br />
Note: preg_match(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg(). </p>
<p><a href="http://uk3.php.net/ereg" rel="nofollow">http://uk3.php.net/ereg</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
