Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEND_VAL and others use second operand for the named argument #84

Open
gmirchev opened this issue Sep 26, 2024 · 2 comments
Open

SEND_VAL and others use second operand for the named argument #84

gmirchev opened this issue Sep 26, 2024 · 2 comments
Labels

Comments

@gmirchev
Copy link

But VLD doesn't print the info.

More information:

From zend_compile.php - zend_compile_args():

            opline = zend_emit_op(NULL, opcode, &arg_node, NULL);
            if (arg_name) {
                    opline->op2_type = IS_CONST;
                    zend_string_addref(arg_name);
                    opline->op2.constant = zend_add_literal_string(&arg_name);
                    opline->result.num = zend_alloc_cache_slots(2);
            } else {
                    opline->op2.opline_num = arg_num;
                    opline->result.var = EX_NUM_TO_VAR(arg_num - 1);
            }

where opcode can be

ZEND_SEND_VAL_EX
ZEND_SEND_VAL
ZEND_SEND_VAR
ZEND_SEND_REF
ZEND_SEND_VAR_EX
ZEND_SEND_FUNC_ARG
ZEND_SEND_VAR_NO_REF
ZEND_SEND_VAR_NO_REF_EX

@gmirchev gmirchev added the bug label Sep 26, 2024
@gmirchev
Copy link
Author

gmirchev commented Sep 26, 2024

Online-PHP-editor-vld-for-bspSe-09-26-2024_11_26_AM

@gmirchev
Copy link
Author

Here we see that in SEND_VAR the variable name is shown.
Online-PHP-editor-vld-for-NbGqJ-09-26-2024_11_32_AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant