Archive for the 'PHP certification' Category

IE9 and JPEG-XR: first impressions

Apr 5th, 2010

One of the new features in IE9 is the support for the JPEG-XR format, which reportedly has a better compression. Is it something we should dive into ASAP? JPEG-XR The wikipedia article is here. This format is developed and patented (red flag!) by Microsoft (yellow flag! 🙂 ), it replaces the suggested JPEG-2000 format and […]


What’s $this?

Aug 31st, 2006

Simple question, what’s $this – a or b?


Resources are passed by reference

Sep 7th, 2005

When copying one resource to another, you’re actually creating a reference to the original resource, this is not an actual copy. See the example.


Discount on the Zend PHP certification exam

Aug 24th, 2005

Expires August 31, $75 off the “normal” price of $200. For details and purchase, see the PHP certification section of the site. Zend are celebrating the 600th PHP certified engineer, so they’ve decided on this discount. Which is nice. $200 has always seemed a bit more than an open-source developer is willing to pay […]


My certification story

Aug 5th, 2005

Two stories from guys that have already passed the PHP cert exam.


Another PHP cert blog

Jun 26th, 2005

Today I came across a new Zend PHP certification blog.


Certification press release from Zend

Jun 22nd, 2005

Here it is » Major corporations benefit from Zend certified engineers. Every press release polishes the truth at least a little bit, but nevertheless this one sounds promising .


ZCE certificate

May 21st, 2005

Wo-hoo! The printed certicate found its way to my wall 🙂


PHP certification books – sample chapters

May 4th, 2005

php|architect’s “Zend PHP Certification Practice Book” Zend’s official PHP certification study guide


Zend Certified Engineer

Apr 26th, 2005

Yep, it’s a fact. Here’s the proof. I took the exam almost a month ago but waited so that most of the details are erased from my memory, so that I don’t accidentally violate the exam’s rules which state that you should not reveal information about the exam. So I took the exam at a […]



Mar 29th, 2005

strcmp() compares two strings and gives -1, 0 or 1 depending on wheather the first string is “smaller”, equal to or greater than the second one. < ?php echo strcmp('aa','bb'); // prints -1 echo strcmp('bb','bb'); // prints 0 echo strcmp('zz','yy'); // prints 1 ?> Thus being said there’s an error in the php certification guide […]



Mar 29th, 2005

Serializing is a nice way to get a string out of more complicated data structure. It’s probably mostly used to sting-alize array data, although you can serialize scalar data as well. The result of the serialization is no nature wonder, it’s just a string that describes what is serialized and a value of the serialized […]


A character from a string

Mar 29th, 2005

You can get a specific character from a string as if the string was an array. < ?php $s = 'PHP'; echo $s[0]; // will print "P" ?> This syntax may be confusing, because someone looking at the code might expect that $s is an array. Well it is an array, an array of characters, […]


Array sorting options

Mar 29th, 2005

When sorting an array, for example by using sort() there are three constants you can use to determine how the sorting will work: SORT_REGULAR (default) when you have mixed types of variables in the array it won’t cast them. The results can be … hmm .. interesting. It will sort first all string types and […]


Walking the array

Mar 29th, 2005

The certification guide demonstrates what is probably the fastest (performance-wise) way to go through the elements of an array – using the array_walk() function. The example in the guide is using a callback function to use the elements of the array. But there’s more than that. Using the array_walk() function you can also make use […]


Array keys and case sensitivity

Mar 29th, 2005

Yep, array keys are case sensitive. So you can do: < ?php $a = array('key'=> 1, ‘Key’ => 2); print_r($a); ?>and it will print Array ( [key] => 1 [Key] => 2 ) Similarly if you call array_keys() on $a, like: < ?php $a = array('key'=> 1, ‘Key’ => 2); print_r(array_keys($a)); ?>…you’ll get: Array ( […]


The old superglobals

Mar 29th, 2005

Prior to php 4.1. there were no $_POST, $_GET, etc. superglobal arrays, but there were a bunch of other superglobals, like $HTTP_POST_VARS, $HTTP_GET_VARS and so on. The guide mentions this in the forms chapter but there is a typo (repeated several times 🙂 ) so I thought I should mention it. The guide talks about […]


Redefine $this?

Mar 28th, 2005

I was wondering – can you redefine the special variable $this when in a method of a class. It turns out that yes, you can. Consider this class: < ?php class Some { function Some(){} function another(){ $this = 5; var_dump($this); } } ?> If you create an object and call the another() method, it […]


Static methods and performance

Mar 28th, 2005

How fast/slow are the static methods? I did a test once to try and figure that out. It turns out: Calling a method statically is just a bit faster than calling it “normally” Calling a static method is twice as fast if your object didn’t exist to begin with Static methods are twice as slow […]


Static methods and $this

Mar 28th, 2005

The book tells about static methods but it forgets to mention that you cannot use $this in static methods. A static method is pretty much like a normal stand-alone function is not aware about the object as a whole. So you can call the static method when no object of that class exists. In this […]



Mar 28th, 2005

Just a thought on the exam prep question 1. The question in its essence is “How much is 3 – 5 % 3”; The answer is 1 because 5 % 3 is 2 and 3 – 2 is 1. That’s exactly what the book says but in the explanation of the correct answer there’s a […]



Mar 28th, 2005

So far (end of chapter 1, just before jumping into the OO part) the book doesn’t say a word about superglobals. I think this is an important topic and I suppose there must be questions about the superglobals on the exam. The best place to get an idea about the superglobals is this manual […]


Variable scope

Mar 25th, 2005

The certification book goes on with the calc_weeks example: < ?php function calc_weeks() { $years += 10; return $years * 52; } $years = 28; echo calc_weeks(); ?> Exactly as the guide says, the $years var in the function won’t get the 28 value, it will get a null instead. But then the guide says […]


Function parameters passed by reference

Mar 25th, 2005

Consider the following example from the book that is supposed to illustrate how a parameter is passed to a function by reference, not by value. < ?php function calc_weeks(&$years) { $my_years += 10; return $my_years * 52; } $my_years = 28; echo calc_weeks($my_years); ?> Something wrong? Yes, the function calc_weeks() is taking $years parameter, passed […]


Evaluating expressions in for-loops

Mar 25th, 2005

The usual syntax of a for-loop is < ?php for($i = 0; $i < 10; $i++){ // do your thing } ?> where $i = 0 is evaluated once before the loop starts $i < 10 is the condition of the loop, it's executed the number of times the loop executes plus 1. Why plus […]