Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Highlight variable on variables "$$" #92

Open
zlianon opened this issue May 4, 2019 · 2 comments
Open

Highlight variable on variables "$$" #92

zlianon opened this issue May 4, 2019 · 2 comments

Comments

@zlianon
Copy link

zlianon commented May 4, 2019

https://www.php.net/manual/en/language.variables.variable.php

@StanAngeloff
Copy link
Owner

Can you elaborate with some examples?

@zlianon
Copy link
Author

zlianon commented May 4, 2019

@StanAngeloff

...

if (!is_string($output)) {
    $$output = $this->handleException(new \UnexpectedValueException(sprintf(
        'Value must be type of string, "%s" returned', gettype($output)
    )));

    if (is_a($$output, '\Whoops\Run')) {
        $$output->handleException(new \UnexpectedValueException(sprintf(
            'Value must be type of string, "%s" returned', gettype($output)
        )));
    }
}

echo $output ?? $$output;

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

No branches or pull requests

2 participants