Greetings Internals,
The vote for the "Explicit octal integer literal notation" RFC is now open.
https://wiki.php.net/rfc/explicit_octal_notation
It will last two [2] weeks, until 2020-11-25.
Best regards,
George P. Banyard
Hello!
PHP currently supports ??= assignment, as shortly to $a = $a ?? null, but
it does not supports ?:= as shortly to $a = $a ?: null.
There are some reason to that?
- https://wiki.php.net/rfc/null_coalesce_equal_operator
- https://wiki.php.net/rfc/short_ternary_equal_operator
Thanks!
Atenc
Hi,
Den 2020-11-11 kl. 17:18, skrev David Rodrigues:
Hello!
PHP currently supports ??= assignment, as shortly to $a = $a ?? null, but
it does not supports ?:= as shortly to $a = $a ?: null.
There are some reason to that?
- https://wiki.php.net/rfc/null_coalesce_equal_operator
- https://wiki.p
On Tue, 10 Nov 2020 at 17:39, Hans Henrik Bergan wrote:
>
> something i'm missing from Javascript is the ability to give names to
> closures, ...the name is optional, and only visible inside the closure
> itself, and unfortunately this is not legal in PHP, i wish it was.
I really like that...but
On 11.11.2020 at 18:39, Dan Ackroyd wrote:
> On Tue, 10 Nov 2020 at 17:39, Hans Henrik Bergan wrote:
>>
>> something i'm missing from Javascript is the ability to give names to
>> closures, ...the name is optional, and only visible inside the closure
>> itself, and unfortunately this is not legal
I think that introducing a new variable, that even uncommon, could cause BC.
My suggestion is to reuse the keyword `as` to set a variable that will
represent its own closure. It is more flexible once that we could choose
any name and reuse in nested closures. It is pretty similar to how SQL
works
On 11/11/2020 17:59, Christoph M. Becker wrote:
In JavaScript, a named function expression is different to a function
declaration:
var fn = function foo() {console.log('blah')}
foo()
=> Uncaught ReferenceError: foo is not defined
vs.
function foo() {console.log('blah')}
Hi everyone,
maybe a bad idea, but what about addressing the "Principle of least
astonishment" issue by allowing to specify/capture the variable after
the function is assigned:
$f = function () use ($f) {...};
With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem,
Michael Vo
if i have understood the "as"-suggestion correctly:
$fn = function() as $lambdaOrAnyName {var_dump($lambdaOrAnyName);};
(function() as $lambdaOrAnyName{var_dump($lambdaOrAnyName);})();
then that syntax is fine with me. this is also very close to how it
works in JavaScript (except the "as" part),
Hello!
I have been asked by a friend if declare(strict_types=1) will be applied by
default for some version of PHP, like 9.x or will it be always required by
all scripts forever. Someone can tell me?
If yes, what is the reason for requiring it? Why it can't be the default
behavior (or maybe, the
> Le 11 nov. 2020 à 21:20, David Rodrigues a écrit :
>
> Why it can't be the default
> behavior (or maybe, the unique behavior).
IMNSHO, a good reason for keeping weak typing, is that developers are not
willing to review and refactor megabytes of valid code that take advantage of
implicit t
On 11/11/2020 20:20, David Rodrigues wrote:
I have been asked by a friend if declare(strict_types=1) will be applied by
default for some version of PHP, like 9.x or will it be always required by
all scripts forever. Someone can tell me?
If yes, what is the reason for requiring it? Why it can't b
On Wed, 11 Nov 2020 at 21:47, Rowan Tommins wrote:
> On 11/11/2020 20:20, David Rodrigues wrote:
> > I have been asked by a friend if declare(strict_types=1) will be applied
> by
> > default for some version of PHP, like 9.x or will it be always required
> by
> > all scripts forever. Someone can
On 11/11/2020 20:20, David Rodrigues wrote:
If yes, what is the reason for requiring it? Why it can't be the default
behavior (or maybe, the unique behavior).
There was some discussion around the idea of adding language editions to
PHP for 8.0, however the pandemic resulted in to the in-person
14 matches
Mail list logo