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

Referenced parameters not showing as referenced #39

Open
quanyang opened this issue Jul 7, 2016 · 0 comments
Open

Referenced parameters not showing as referenced #39

quanyang opened this issue Jul 7, 2016 · 0 comments

Comments

@quanyang
Copy link

quanyang commented Jul 7, 2016

Should there be a way to tell if the argument was referenced?

Example:

<?php
function doNothing(&$var) {
$var = 'a';
}
$first = '1';
doNothing($first);
?>

Output

Block#1
    Stmt_Function<doNothing>
    Expr_Assign
        var: Var#1<$first>
        expr: LITERAL('1')
        result: Var#2
    Expr_FuncCall
        name: LITERAL('doNothing')
        args[0]: Var#1<$first>
        result: Var#3
    Terminal_Return
        expr: LITERAL(1)

Function doNothing():
Block#1
    Expr_Param
        name: LITERAL('var')
        result: Var#1<$var>
    Expr_Assign
        var: Var#2<$var>
        expr: LITERAL('a')
        result: Var#3
    Terminal_Return
        expr: LITERAL(NULL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant