Sjoerd Maessen blog

PHP and webdevelopment

Archive for the ‘Regexp’ Category

Passing the PHP 5.3 ZCE exam

with 4 comments

I passed the PHP 5.3 ZCE exam
Today I passed the exam to become a PHP 5.3 ZCE. Like everyone else I had to sign the non-disclosure contract so I can’t go into detail about the questions that were asked, I can however tell my impressions of the exam and how prepared for it.

Differences with the previous exam
The first thing I noticed when I bought the PHP 5.3 exam voucher was that there was no option to order a bundle of preparation tests. There was however a free study guide. The new study guide can not be compared with the previous php|architect’s Zend PHP 5 Certification Study Guide. Were the new free study guide gives a quick overview (including some example questions) of each topic in the exam the original study guide starts with basics of PHP and really covers each topic thorough, except for the new PHP 5.3 features. Read the rest of this entry »

Written by Sjoerd Maessen

December 30th, 2010 at 3:54 pm

Limit the number of newlines in a string

without comments

A very short blog post this time. I often use the following short function to limit the number of breaks/newlines in comments that people can submit on a news article or other user input. You can easily limit the number of characters in a comment by using the PHP strlen function, but the comment can still use a lot of vertical space on your website if the user uses 5 breaks in his comment. See the function below to prevent this type of comments:
Read the rest of this entry »

Written by Sjoerd Maessen

January 28th, 2010 at 10:44 pm

Posted in Regexp

Tagged with , , ,