#48742 [NEW]: closure vs anonymous functions.

From: Date: Tue, 30 Jun 2009 15:54:03 +0000
Subject: #48742 [NEW]: closure vs anonymous functions.
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-2433@lists.php.net to get a copy of this message
From: teftin at gmail dot com Operating system: PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: closure vs anonymous functions. Description: ------------ documentation states for function.anonymous states: "Anonymous functions, also known as closures ..." this sentence might be true in context of (current) php implementation, but it is not true in general, as not all anonymous functions are closures, and closures don't have to be connected to anonymous functions or functions at all. http://en.wikipedia.org/wiki/Closure_%28computer_science%29 ... The term closure is often mistakenly used to mean anonymous function. This is probably because most languages implementing anonymous functions allow them to form closures and programmers are usually introduced to both concepts at the same time. These are, however, distinct concepts. Reproduce code: --------------- --- From manual page: functions.anonymous --- -- Edit bug report at http://bugs.php.net/?id=48742&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48742&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48742&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48742&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48742&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48742&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48742&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48742&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48742&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48742&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48742&r=support Expected behavior: http://bugs.php.net/fix.php?id=48742&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48742&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48742&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48742&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48742&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48742&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48742&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48742&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48742&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48742&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48742&r=mysqlcfg

« previous php.doc.bugs (#2433) next »