note 113341 added to function.unset
| From: | Anonymous | Date: | Sun, 29 Sep 2013 15:18:08 +0000 |
| Subject: | note 113341 added to function.unset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-196414@lists.php.net to get a copy of this message | ||
This is a bug or i missing something?
<?php
$a = function() use (&$a){
unset($a); // all good?
};
$b = function() use (&$b){
$b = null; // Fatal error: Cannot destroy active lambda function
};
var_dump($a(), $b());
?>
----
Server IP: 69.147.83.199
Probable Submitter: 5.28.161.23
----
Manual Page -- http://php.net/manual/en/function.unset.php
Edit -- https://master.php.net/note/edit/113341
Del: integrated -- https://master.php.net/note/delete/113341/integrated
Del: useless -- https://master.php.net/note/delete/113341/useless
Del: bad code -- https://master.php.net/note/delete/113341/bad+code
Del: spam -- https://master.php.net/note/delete/113341/spam
Del: non-english -- https://master.php.net/note/delete/113341/non-english
Del: in docs -- https://master.php.net/note/delete/113341/in+docs
Del: other reasons-- https://master.php.net/note/delete/113341
Reject -- https://master.php.net/note/reject/113341
Search -- https://master.php.net/manage/user-notes.php