|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-10-12 15:07 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: nikic
[2014-10-12 15:07 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 26 03:00:01 2025 UTC |
Description: ------------ It would be useful to call just defined anonymous function to get private variable scope like this: $bar = 1; ... $foo = (function() { $bar = [1, 2, 3]; $bar[ 'sum' ] = array_sum( $bar ); return $bar; })(); # $bar is unchanged