Bug #52039 [Opn->Fbk]: Closure problem with 5.3.2
| From: | degeberg@php.net | Date: | Thu, 10 Jun 2010 12:09:48 +0000 |
| Subject: | Bug #52039 [Opn->Fbk]: Closure problem with 5.3.2 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151290@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52039&edit=1
ID: 52039
Updated by: degeberg@php.net
Reported by: neto dot joaobatista at gmail dot com
Summary: Closure problem with 5.3.2
-Status: Open
+Status: Feedback
Type: Bug
Package: Scripting Engine problem
Operating System: Linux, Fedora 13 64 bits
PHP Version: 5.3.2
New Comment:
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
I get the following output:
string(9) "5.3.3-dev"
object(Closure)#1 (1) {
["static"]=>
array(1) {
["test"]=>
string(12) "Closure test"
}
}
Previous Comments:
------------------------------------------------------------------------
[2010-06-10 13:53:26] neto dot joaobatista at gmail dot com
Description:
------------
NULL when using Closures with "use" keyword in PHP 5.3.2
Test script:
---------------
<?php
$test = 'Closure test';
$closure = function() use ( $test ) { return $test; };
var_dump( phpversion() , $closure );
Expected result:
----------------
PHP 5.3.0 output:
string(5) "5.3.0"
object(Closure)#1 (1) {
["static"]=>
array(1) {
["test"]=>
string(12) "Closure test"
}
}
Actual result:
--------------
PHP 5.3.2 output:
string(5) "5.3.2"
NULL
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52039&edit=1