On dikini.net today, there's a new post that talks about a method of implementing saved state in PHP, and how to couple it with closures.
A closure represents a state => implemenation of a state pattern. This is a bit rich. Usually in OO programming the state pattern is implemented by encapsulating different protocols, for denoted states. This is simple to implement by substituting your protocol specification with a different name.
In a previous short post I describe a way to emulate closures in php. Using that technique execution environment, otherwise known as a call stack can be saved for future use. This can be put to good use. A couple of patterns or programming techniques could be useful in practice.
His example starts off with the Drupal hooks, using the State pattern to create a method of tracking "where we are" via PHP.