You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to the top of every file, but I don't know how or if it's possible to enable this in boris.
This isn't a huge issue assuming you test your code, but it's nice to have the same behavior for things I write in boris as the code I'm working on.
$ boris
[1] boris> declare(strict_types=1);
[2] boris> function foo(): int { return'123'; }
// NULL
[3] boris> foo();
// 123
$ php -r "declare(strict_types=1); function foo(): int { return '123'; }; foo();"
PHPFatal error: UncaughtTypeError: Return value of foo() must be of the type integer, string returned in Command line code:1Stack trace:
#0 Command line code(1): foo()#1 {main}
thrown in Command line code on line 1
The text was updated successfully, but these errors were encountered:
PHP projects I'm working on lately are adding:
to the top of every file, but I don't know how or if it's possible to enable this in boris.
This isn't a huge issue assuming you test your code, but it's nice to have the same behavior for things I write in boris as the code I'm working on.
$ boris
$ php -r "declare(strict_types=1); function foo(): int { return '123'; }; foo();"
The text was updated successfully, but these errors were encountered: