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

Create new variable modifier or default subparser for var_export #3

Open
rafageist opened this issue Jun 12, 2017 · 0 comments
Open
Assignees

Comments

@rafageist
Copy link
Member

So far (div 4.9) can show the contents of a variable (similar to the function var_export in PHP), as follows:

// create subparser
function export($src, $items){
    $v = $items[$src];
    if (is_object($v))
    $v = get_object_vars($v);
    return str_replace("\n","",var_export($v, true));
}

div::setSubParser('export');

We are evaluating the possibility of creating a variable modifier or a sub-parser similar to:

{export}varname{/export}
@rafageist rafageist reopened this Nov 13, 2020
@rafageist rafageist self-assigned this Jan 27, 2024
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