Sjoerd Maessen blog

PHP and webdevelopment

Archive for the ‘syntax’ 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

Separating your controller from your view

without comments

What is a controller?
A controller can best be described as the set of instructions and algorithms that are responsible for making your application actually doing something. Often based on user input. You could say your controller is your business logic.

What is a view?
The view is the presentation of your application, the part that our user sees. The view won’t do any processing (like math, checking data,…) it will just show data.

Why don’t you separate your logic and view?
I don’t know how or I don’t use a framework. Those are both often heard excuses when I ask someone why he doesn’t separate the logic and view of his application. Even when you Read the rest of this entry »

Written by Sjoerd Maessen

August 9th, 2010 at 12:08 pm

PHP alternative, lazy syntax

without comments


Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/smaessen/domains/sjoerdmaessen.nl/private_html/wp-content/plugins/source-code-syntax-highlighting-plugin-for-wordpress/geshi.php on line 2147

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/smaessen/domains/sjoerdmaessen.nl/private_html/wp-content/plugins/source-code-syntax-highlighting-plugin-for-wordpress/geshi.php on line 2147

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/smaessen/domains/sjoerdmaessen.nl/private_html/wp-content/plugins/source-code-syntax-highlighting-plugin-for-wordpress/geshi.php on line 2147

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/smaessen/domains/sjoerdmaessen.nl/private_html/wp-content/plugins/source-code-syntax-highlighting-plugin-for-wordpress/geshi.php on line 2147

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/smaessen/domains/sjoerdmaessen.nl/private_html/wp-content/plugins/source-code-syntax-highlighting-plugin-for-wordpress/geshi.php on line 2147

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/smaessen/domains/sjoerdmaessen.nl/private_html/wp-content/plugins/source-code-syntax-highlighting-plugin-for-wordpress/geshi.php on line 2147

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/smaessen/domains/sjoerdmaessen.nl/private_html/wp-content/plugins/source-code-syntax-highlighting-plugin-for-wordpress/geshi.php on line 2147

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/smaessen/domains/sjoerdmaessen.nl/private_html/wp-content/plugins/source-code-syntax-highlighting-plugin-for-wordpress/geshi.php on line 2147

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/smaessen/domains/sjoerdmaessen.nl/private_html/wp-content/plugins/source-code-syntax-highlighting-plugin-for-wordpress/geshi.php on line 2147

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/smaessen/domains/sjoerdmaessen.nl/private_html/wp-content/plugins/source-code-syntax-highlighting-plugin-for-wordpress/geshi.php on line 2147

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/smaessen/domains/sjoerdmaessen.nl/private_html/wp-content/plugins/source-code-syntax-highlighting-plugin-for-wordpress/geshi.php on line 2147

Alternative, lazy what?

Consider the next example:

  1. span class=”st0″>'<li>’‘<a href="/news/’.$oItem->id.‘-‘.$oItem->rewrite.‘.html">’.$oItem->title.‘</a>’‘</li>’

We could write the above like this: Read the rest of this entry »

Written by Sjoerd Maessen

April 12th, 2010 at 7:22 pm

Posted in syntax

Tagged with ,