make ()-invoke and call_user_func a bit more uniform ...
commitbc1642581aab303e59cdb74cff429b534e5a2cdd
authorEugene Letuchy <eletuchy@fb.com>
Wed, 25 Sep 2013 21:51:50 +0000 (25 14:51 -0700)
committerSara Golemon <sgolemon@fb.com>
Wed, 9 Oct 2013 23:30:09 +0000 (9 16:30 -0700)
tree736e0ef85b35305ba8258d6167ee52aae80c1b52
parentca05e232809df49c30b207dcc3d1b5559bd2cb4e
make ()-invoke and call_user_func a bit more uniform ...

A `$var` containing a string, a closure, and (by
 happenstance?) functor instance, worked when invoked directly by a
 pair of parens afterwards. This diff extends that behavior to also
 support the ##array($instance, 'method')## and ##array('Class',
 'method')## callable syntaxes.

 It would be nice if we had a facility for
 explicitly creating function pointers in the runtime.

Reviewed By: @jdelong

Differential Revision: D984939
hphp/runtime/vm/bytecode.cpp
hphp/test/quick/call_callable.php [new file with mode: 0644]
hphp/test/quick/call_callable.php.expectf [new file with mode: 0644]
hphp/test/zend/good/Zend/tests/indirect_call_array_003.php [moved from hphp/test/zend/bad/Zend/tests/indirect_call_array_003.php with 100% similarity]
hphp/test/zend/good/Zend/tests/indirect_call_array_003.php.expectf [moved from hphp/test/zend/bad/Zend/tests/indirect_call_array_003.php.expectf with 100% similarity]
hphp/test/zend/good/Zend/tests/indirect_call_array_004.php [moved from hphp/test/zend/bad/Zend/tests/indirect_call_array_004.php with 100% similarity]
hphp/test/zend/good/Zend/tests/indirect_call_array_004.php.expectf [moved from hphp/test/zend/bad/Zend/tests/indirect_call_array_004.php.expectf with 100% similarity]