Just a Few Lines

That's all it takes, usually...

Making use of PHP closures

October 12th, 2009 | ,

Even though closures in PHP are not quite as easy to use as in other languages, we can still employ them for something useful.
Read more…

Groovy’s ?. operator in PHP. Sort of.

October 6th, 2009 | ,

In almost all languages, chaining method calls on nested objects is either ugly or unsafe. Groovy found an elegant way around it with ?. operator. PHP didn’t. This article shows what can we do about it. Read more…

What’s wrong with PHP closures?

October 2nd, 2009 | ,

PHP 5.3, along with many other features, introduced closures. So now we can finally do all the cool stuff that Ruby / Groovy / Scala / any_modern_language guys can do, right? Well, we can, but we probably won’t… Here’s why. Read more…

Web Application Elements: Templates

September 30th, 2009 | ,

One of the things PHP does really well is templates. Actually, every PHP file is a template. This is rather unique feature, considering other platforms, like Java, .NET or Ruby. With PHP as a platform, the language itself is usually good enough for a template solution.

There is, however, one feature (provided by some template engines), that makes managing complex sites easier. Read more…