Hi!
3. I am already aware of several people within internals that believe any
version of this feature will result in uncontrolled chaos in PHP codebases.
I think this is false, as I do not see that kind of uncontrolled chaos in
the languages which do have this feature. However I would think that
I would like to create my first RFC proposing adding a new operator
`!instanceof` named `T_NOT_INSTANCEOF`.
The purpose of this RFC is to add syntactic sugar for checking if an object
is not an instance of something else.
The current syntax for checking not instance of looks the following way
```p
Heya,
While I definitely agree with this, and after more than 10 years of PHP I
still have the tendency to write `if ($object !instanceof MyClass)` anyway.
Would it be possible, or would it collide with constants to do the
following?
```
$object === MyClass;
$object !== MyClass;
```
The reason I'm
pon., 13 gru 2021 o 12:10 Lynn napisał(a):
> Heya,
>
> While I definitely agree with this, and after more than 10 years of PHP I
> still have the tendency to write `if ($object !instanceof MyClass)` anyway.
> Would it be possible, or would it collide with constants to do the
> following?
> ```
>
On Mon, Dec 13, 2021 at 12:19 PM Michał Marcin Brzuchalski <
michal.brzuchal...@gmail.com> wrote:
>
> Why not "not" instead? The "!" in front of "i" in "!implements" is almost
> not visible which IMO could get easily ignored unintentionally.
> Instead constructs like "$foo not implements stdClass"
> The "instanceof" is counterintuitive for me compared to operators.
Hmm interesting, might be possible to go that direction by making
`T_IS_EQUAL` accept `class_name_reference`. I like that, biggest concern
with this is what is the difference (if any) between
```php
$object !== MyClass
$object !=
Den man. 13. dec. 2021 kl. 12.53 skrev Oliver Nybroe :
> What do people think about this? Would love to clarify if needed.
>
> Best regards
> Oliver Nybroe (he/him)
I find this to be more a problem to be solved by individual coding
standards and cs tools. The !instanceof syntax is awkward at best,
This has been requested for years (since at least 2009?) but it seems no
actual plan has been proposed
How about this?
since we already have the constant FILE_USE_INCLUDE_PATH , seems it was
introduced in PHP5.0.0,
1: FILE_USE_INCLUDE_PATH currently collides with LOCK_SH (they're both 1),
lets cha
>Четверг, 9 декабря 2021, 8:22 +03:00 от André Hänsel :
>
>PHP 8 has named parameters in function calls, Kotlin has named parameters in
>function calls.
>
>Kotlin has this handy feature that you can put parameters with defaults
>before normal ones. Those parameters can then only be used by nam