create_functionand run them with any functions that support callbacks (See
PHP 5.3 (unreleased as of 2009-03-12) will introduce Lambda functions and closures. I'm not really sure if the implementation is sound or complete, but I'm sure there are enough functional programming language implementations and progammers to make sure its *doing the right thing*. I'm very glad because I was afraid PHP was going to be steered backwards by opinions like this.
See also IBM Developer Works, which had an article on these forthcoming features in What's new in PHP V5.3, Part 2: Closures and lambda functions.
Someone asked recently what the design philosophy of PHP was. I had to say, "PHP was meant to be a server-side include system for HTML documents with a Perl syntax. It's been trying to outrun its heritage ever since."