laravel / tinker

Powerful REPL for the Laravel framework.
https://laravel.com/docs/artisan#tinker
MIT License
7.32k stars 130 forks source link

Use isset() method #115

Closed mimosu closed 3 years ago

mimosu commented 3 years ago

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

GrahamCampbell commented 3 years ago

Please open an issue upstream.

GrahamCampbell commented 3 years ago

https://github.com/bobthecow/psysh/issues

bobthecow commented 3 years ago

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

https://3v4l.org/SOsHd

GrahamCampbell commented 3 years ago

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?

bobthecow commented 3 years ago

maybe? ¯\_(ツ)_/¯

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

driesvints commented 3 years ago

Nice. Thanks @bobthecow!