Doc #72331 [NEW]: most simple way to call anonymous function assigned to object property missing
| From: | contact at jaborandi dot org dot ru | Date: | Fri, 03 Jun 2016 18:29:54 +0000 |
| Subject: | Doc #72331 [NEW]: most simple way to call anonymous function assigned to object property missing | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-13485@lists.php.net to get a copy of this message | ||
From: contact at jaborandi dot org dot ru
Operating system: m745G2Q4
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:most simple way to call anonymous function assigned to object property missing
Description:
------------
When anonymous function is assigned to a variable, which is an object
property, it can still be called in a regular way (without use of
call_user_func, or Closure::call):
($object->property)($arg1, $arg2, ...);
This is not mentioned anywhere (I searched on here
http://php.net/manual/en/functions.anonymous.php
and on page of
Callback/Callable and those about classes).
Think it should be added to "Anonymous function variable assignment
example" section of the http://php.net/manual/en/functions.anonymous.php
page
Did use advanced search before submission.
Thanks!
--
Edit bug report at https://bugs.php.net/bug.php?id=72331&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72331&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72331&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72331&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72331&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72331&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72331&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72331&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72331&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72331&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72331&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72331&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72331&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72331&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72331&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72331&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72331&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72331&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72331&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72331&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72331&r=mysqlcfg