Archive for the 'PHP certification' Category

Breaking out of the loops

Mar 24th, 2005

The cert guide is maybe not 100% clear on the question of breaking out of a loop, but you can break and continue in all types of loops – for, while and foreach (the latter wasn’t mentioned in the loops section of the book). About the continue when in nested loops. Well, it is true […]

 

booleans casted to strings

Mar 15th, 2005

What happens when a false value is casted to a string? I.e. what is the result of the following: < ?php var_dump((string)false); ?> The answer is: string(0) “” This is good to know and expect when using some string functions that sometimes return a string and sometimes a boolean. Such functions are strstr(), strpos(), etc.

 

alternative if-then-else syntax

Mar 11th, 2005

There’s a small error in the PHP certification guide in the alternative if-then-else syntax code. This alternative syntax goes like: < ?php if (true) : echo 'it is true'; else : echo 'so not true'; endif; ?> In the example given in the cert guide, the ; after endif is missing, which will cause a […]

 

if-then-else

Mar 11th, 2005

Overall, the cert guide is pretty comprehensive on the subject of the conditional statements. One tiny insignificant detail. There is an example that goes like < ?php if ($a < 100) { echo 'Less than 100'; } else { echo 'More than 100'; } ?> Well, it’s evident that the second message should have been […]

 

prefix/postfix increment/decrement

Mar 9th, 2005

The PHP certification guide is short but perfectly clear on the topic of postfix and prefix operations. My only remark is that due to the font used in this book, the pre/postfix decrement (–) is displayed as one long dash 🙁 Also the reader might be wondering if one can combine those operations, like: < […]

 

Assignment by reference

Mar 8th, 2005

In this section, the curious reader might wonder about the combination of assignment by reference and a simple arithmetic operation such as addition. OK, let’s take a step back. Consider this: < ?php $a = 10; $b = $a; $a = 20; echo $b; ?> In this example the output will be 10, because the […]

 

About the PHP constants

Mar 7th, 2005

The reader of the PHP cert guide might be wondering about some aspects of the PHP constants, because the constants section of the book doesn’t go into as much detail as it goes for other sections like variables for example. 1. It’s not necassary to name the constants always in upper case. It is, however, […]

 

Smart quotes

Mar 7th, 2005

Smart quotes are more trouble than they’re worth. To me, they should be banned forever from any publication. Unfortunatelly, the PHP certification guide is using smart quotes even in the code, I hope they are not confusing the people that are just getting started with PHP. The most confusing, I think, is the example where […]

 

First off – some links

Mar 7th, 2005

The sites Zend PHP Certification – the official homepage of the exam http://www.zend.com/store/education/certification/zend-php-certification.php php|architect’s Zend Certification pages http://www.phparch.com/cert/ The books Amazon.com: Books: PHP Certification Study Guide http://www.amazon.com/exec/obidos/tg/detail/-/0672327090/… Amazon.com: Books: The Zend PHP Certification Practice Test Book – Practice Questions for the Zend Certified Engineer Exam http://www.amazon.com/exec/obidos/tg/detail/-/0973589884/??¦

 

Let’s get, let’s get, let’s get started

Mar 7th, 2005

I plan to take the Zend certification exam so I decided it might be a good idea to share some thoughts along the way. I hope it can help others who are decided or thinking about getting certified. I think I’ll be mainly commenting on the certification book and will probably try to add to […]