laravel/tinker

Use isset() method

mimosu opened this issue · 6 comments

isset(1);
PHP Parse error: Syntax error, unexpected T_LNUMBER on line 1

Please open an issue upstream.

This is … what PHP does when you call isset() on a literal number?

https://3v4l.org/SOsHd

Is the complaint that psysh doesn't catch that this is not allowed, and provide a nice error message, like it does for some other syntax errors?

maybe? ¯\_(ツ)_/¯

I just pushed a change that adds a code cleaner for isset() ☝️

Nice. Thanks @bobthecow!