mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Add first-class callables
Support acquiring a Closure to a callable using the syntax func(...), $obj->method(...), etc. This is essentially a shortcut for Closure::fromCallable(). RFC: https://wiki.php.net/rfc/first_class_callable_syntax Closes GH-7019. Co-Authored-By: Nikita Popov <nikita.ppv@gmail.com>
This commit is contained in:
parent
42cb5b5fa8
commit
d0b09a7be4
40 changed files with 1078 additions and 515 deletions
|
@ -22,7 +22,7 @@
|
|||
#include <zend.h>
|
||||
#include <zend_vm_opcodes.h>
|
||||
|
||||
static const char *zend_vm_opcodes_names[202] = {
|
||||
static const char *zend_vm_opcodes_names[203] = {
|
||||
"ZEND_NOP",
|
||||
"ZEND_ADD",
|
||||
"ZEND_SUB",
|
||||
|
@ -225,9 +225,10 @@ static const char *zend_vm_opcodes_names[202] = {
|
|||
"ZEND_CHECK_UNDEF_ARGS",
|
||||
"ZEND_FETCH_GLOBALS",
|
||||
"ZEND_VERIFY_NEVER_TYPE",
|
||||
"ZEND_CALLABLE_CONVERT",
|
||||
};
|
||||
|
||||
static uint32_t zend_vm_opcodes_flags[202] = {
|
||||
static uint32_t zend_vm_opcodes_flags[203] = {
|
||||
0x00000000,
|
||||
0x00000b0b,
|
||||
0x00000b0b,
|
||||
|
@ -430,6 +431,7 @@ static uint32_t zend_vm_opcodes_flags[202] = {
|
|||
0x00000101,
|
||||
0x00000101,
|
||||
0x00000101,
|
||||
0x00000101,
|
||||
};
|
||||
|
||||
ZEND_API const char* ZEND_FASTCALL zend_get_opcode_name(zend_uchar opcode) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue