php-closures

Do PHP closures not have access to parnt function parameters?

Hi, I've been writing some code for PHP 5.3, and I wanted to do something similar to the code I'm showing below. I expect this code to print 'hellohello', but it prints 'hello' instead, and an error. It appears the $inner closure does not have access to the outer function's parameters. Is this normal behavior? Is it a PHP bug? I can't s...

No closure support in PHP 5.3.2-1ubuntu4.2

I just realised that a bit of PHP doesn't execute correctly on one server, but it does on another. They're both running Ubuntu 10.04 with PHP PHP 5.3.2 (PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch (cli) (built: May 13 2010 20:03:45)) I'm testing using: $f = function() {}; var_dump($f); die(); On the server that works, the result is: ...