php.vim icon indicating copy to clipboard operation
php.vim copied to clipboard

Highlight variable on variables "$$"

Open zlianon opened this issue 6 years ago • 2 comments

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

zlianon avatar May 04 '19 11:05 zlianon

Can you elaborate with some examples?

StanAngeloff avatar May 04 '19 12:05 StanAngeloff

@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;

zlianon avatar May 04 '19 16:05 zlianon