Hi Levi Morrison,
> A bit off topic, but not entirely:
>
> In my opinion, adding another flag isn't the _real_ fix. Any function
> which does comparisons should take a callable for users to provide any
> comparison they wish. An iteratively better API would be:
>
> function array_unique(list $
Hi internals,
https://wiki.php.net/rfc/iterator_xyz_accept_array recently passed in php 8.2,
fixing a common inconvenience of those functions throwing a TypeError for
arrays.
However, from the `iterator_` name
(https://www.php.net/manual/en/class.iterator.php),
it's likely to become a source of
Hi Mikhail,
> >Basically, we have quite a high-loaded environment and we really want
> >to see timestamps containing milli-/microseconds in our logs.
>
> I'm not knowledgeable enough to comment on the implementation details, but
> from a user point of view I agree the feature would be useful. It
Hi Pedro Nacht,
> Hello, I'm working on behalf of Google and the Open Source Security
> Foundation to help essential open-source projects improve their supply-chain
> security.
Could you expand on that? It isn't obvious from your comment, and I'm curious
about this initiative at Google.
1. H
Hi internals,
Currently, there doesn't seem to be an exact fit for indicating that a method
isn't supported on an object by design (and will throw unconditionally).
(For example, when implementing an interface or overriding a base class, e.g.
an Immutable datastructure not implementing offsetSet
Hi internals,
> > > I've created a new RFC https://wiki.php.net/rfc/deque to add a `final
> > > class Deque`
> > >
> > > This is based on the `Teds\Deque` implementation I've worked on
> > > for the https://github.com/TysonAndre/pecl-teds PECL.
> > >
> > > While `SplDoublyLinkedList` and its subc
Hi internals,
> > I've created a new RFC https://wiki.php.net/rfc/deque to add a `final class
> > Deque`
> >
> > This is based on the `Teds\Deque` implementation I've worked on
> > for the https://github.com/TysonAndre/pecl-teds PECL.
> >
> > While `SplDoublyLinkedList` and its subclass `SplQueue
Hi Larry Garfield,
> >> Returning $this would resolve that, I think. (Making it return a new,
> >> immutable copy of the Deque would be even nicer, but I realize that's
> >> probably not an argument I'm going to win at this point on this RFC.)
> >
> > Technically, you still can have single-expr
Hi Jordan,
> > 4. Returning $this makes code easier to write at some cost to readability
> > - Developers new to php or using `Collections\Deque` for the first time
> > would not immediately know what the code they're reading is doing.
> > (less of a problem with a good IDE, typechecker, and
Hi Stephen,
> As a userland dev & library author it’s nice to see some progression on basic
> data structures, so thank you for your efforts on this!
>
>
> Two little things in the RFC:
>
> The proposed API switches between terms `front`, `back`, `start` and `end` in
> comments - is there mea
Hi Larry Garfield,
> Request:
>
> push() and unshift() currently return void. That's not helpful. It would be
> vastly more useful if they both returned $this. Not as much for chaining,
> but more so that you can add a value to a queue and pass it as an argument to
> another call (often recu
Hi Mel Dafert,
> >The proposed API switches between terms `front`, `back`, `start` and `end`
> >in comments - is there meant to be a conceptual difference between
> >front/start and end/back ?
>
> On a similar note, why are the methods for getting the first/last value called
> `top()`/`bottom()
Hi internals,
> I've created a new RFC https://wiki.php.net/rfc/deque to add a `final class
> Deque`
>
> This is based on the `Teds\Deque` implementation I've worked on
> for the https://github.com/TysonAndre/pecl-teds PECL.
>
> While `SplDoublyLinkedList` and its subclass `SplQueue`/`SplStack`
Hi Levi Morrison,
> I think this RFC is in much better shape now.
>
> The last thing I'll personally push for is dropping `get` and `set`.
> I'm not sure about those names, and the functionality is already
> provided by `offsetGet` and `offsetSet`, albeit through `mixed`
> instead of `int`, but I
> > The name "deque" is used in the standard library of these languages:
> >
> > - C++: std::deque
> > - Java: java.util.Deque (interface)
> > - Python: collections.deque
> > - Swift: Collections.Deque (not standard lib, apparently, but Apple
> > official? Don't know Swift)
> > - Rust: std::co
Hi internals,
Voting has started on https://wiki.php.net/rfc/deque_straw_poll , to gather
feedback on the following options:
1. `\Deque`, the name currently used in the RFC/implementation.
See https://wiki.php.net/rfc/deque#global_namespace
This was my preference because it was short,
m
Hi Pierre,
> > While there is considerable division in whether or not members of internals
> > want to adopt namespaces,
> > I hope that the final outcome of the poll will be accepted by members of
> > internals
> > as what the representative of the majority of the members of internals
> > (from
Hi internals,
> Because the naming choice for new datastructures is a question that has been
> asked many times,
> I plan to create another straw poll (Single transferrable vote) on
> wiki.php.net to gather feedback on the naming pattern to use for future
> additions of datastructures to the SP
Hi Glash Gnome,
> I'm doing the Cairo C API extension.
> Also there is a wrapper written in php for the OOP side( example:
> https://github.com/gtkphp/gtkphp/blob/main/lib/Cairo/Context.php)
>
> So far, so good.
>
> Now let's do the same thing with Gtk,
> (https://github.com/gtkphp/gtkphp/blob/
Hi internals,
> > Removing the centralized PECL builder and dependency manager would most
> > likely lead to a huge regression in the support and manageability. Right
> > now there's one place pecl.php.net to go for the non core extension builds
> > and any dependencies are guaranteed to be non
Hi Nikita Popov,
> 1. There would be the possibility of having an interface Deque that is
> backed by a VecDeque/ArrayDeque implementation. I'm not convinced this
> would actually make sense, but I wanted to throw it out there, given that
> the class is final (which is without any doubt the correc
Hi Andreas,
> Hello list,
> I would like to propose new methods for ReflectionType, that would
> allow treating ReflectionNamedType and ReflectionUnionType in a
> unified way.
> This would eliminate the need for if (.. instanceof) in many use cases.
>
> Some details can still be discussed, e.g. w
Hey Marco Pivetta,
> > What are your thoughts on allowing the `(object)` cast in initializer types
> > where `new` was already allowed, but only when followed by an array literal
> > node. (e.g. continue to forbid `(object)SOME_CONSTANT`) (see
> > https://wiki.php.net/rfc/new_in_initializers)
>
Hi internals,
In PHP 8.1, it is possible to allow constructing any class name in an
initializer, after the approval of https://wiki.php.net/rfc/new_in_initializers
```
php > static $x1 = new ArrayObject(['key' => 'value']);
php > static $x2 = new stdClass();
php > static $x3 = (object)['key' =
Hi Levi Morrison,
> > "Maximum size" shouldn't be an issue for `Deque` specifically, it's a
> > `size_t`. It isn't an issue for SplFixedArray and ArrayObject.
> > (or for
> > PHP would just encounter a fatal error due to either
>
> You wrote a lot, but unfortunately it was based on a misundersta
Hi Mike Shinkel,
> >> Hmm. I must have missed that thread as I was definitely following the list
> >> at that time.
> >>
> >> But I found the thread, which only had three (3) comments from others:
> >>
> >> https://externals.io/message/112639
> >>
> >> From Levi Morrison it seems his objectio
Hi Levi Morrison,
> The name "deque" is used in the standard library of these languages:
>
> - C++: std::deque
> - Java: java.util.Deque (interface)
> - Python: collections.deque
> - Swift: Collections.Deque (not standard lib, apparently, but Apple
> official? Don't know Swift)
> - Rust: std
Hi internals,
Because the naming choice for new datastructures is a question that has been
asked many times,
I plan to create another straw poll (Single transferrable vote) on wiki.php.net
to gather feedback on the naming pattern to use for future additions of
datastructures to the SPL,
with th
Hi Peter Bowyer,
> That is a fair point. Vector is an overloaded and common word. For me a
> vector will always default to an entity characterized by a magnitude and a
> direction, because that's what I learned and used for years. The next
> definition I learned was the Numpy one.
>
> That for me
Hi Pierre,
> It seems that you are writing more than one RFC to add many data
> structures. I love that you're doing that, but I suggest that you'd
> normalize them all
I'm not certain what you mean by "normalize".
https://www.merriam-webster.com/dictionary/normalize mentions
1. "to make confo
Hi internals,
I've created a new RFC https://wiki.php.net/rfc/deque to add a `final class
Deque`
This is based on the `Teds\Deque` implementation I've worked on
for the https://github.com/TysonAndre/pecl-teds PECL.
While `SplDoublyLinkedList` and its subclass `SplQueue`/`SplStack` exist in the
Hi internals,
Currently, array_filter will always return the original keys.
This often requires an additional wrapping call of
array_values(array_filter(...)) to reindex the keys and return a list.
(or applications may not realize there will be gaps in the keys until it causes
a bug or unexpecte
Hi Mike Schinkel,
> >> Given there seems to be a lot of concern about the approach the RFC
> >> proposes would it not address the concerns about memory usage and
> >> performance if several methods were added to SplFixedArray instead (as
> >> well as functions like indexOf(), contains(), map()
Hi Mike Schinkel,
> Given there seems to be a lot of concern about the approach the RFC proposes
> would it not address the concerns about memory usage and performance if
> several methods were added to SplFixedArray instead (as well as functions
> like indexOf(), contains(), map(), filter(), J
Hi Larry Garfield,
> Rather than go point by point, I'm going to respond globally here.
>
> I am frequently on-record hating on PHP arrays, and stating that I want
> something better. The problems with PHP arrays include:
>
> 1. They're badly performing (because they cannot be optimized)
> 2.
Hi Peter Bowyer,
> > > To echo Pierre, a Vector needs to be of a single guaranteed type.
> > > Yes, this gets us back to the generics conversation again, but I presume
> > (perhaps naively?) there are ways to address this question without getting
> > into full-blown generics.
> >
> > Yep, as you s
Hi Tim Starling,
> I would like to know if a patch to make strtolower and strtoupper do
> plain ASCII case conversion would be accepted, or if an RFC should be
> created.
>
> The situation with case conversion is inconsistent.
>
> The following functions do ASCII case conversion: strcasecmp,
>
Hi Pierre Joye,
> Not sure you care or read my reply but I had to jump in one more time here :)
>
> On Sat, Sep 18, 2021 at 8:49 AM tyson andre wrote:
>
> > setSize is useful in allocating exactly the variable amount of memory
> > needed while using less memory than a
> Improving collection/set operations in PHP is something near and dear to my
> heart,
> so I'm in favor of adding a Vector class or similar to the stdlib.
>
> However, I am not a fan of this particular design.
>
> As Levi noted, this being a mutable object that passes by handle is asking
> fo
Hi Max Semenik,
> Since Ds was mentioned, I've added it to your benchmark (code and complete
> results at https://gist.github.com/MaxSem/d0ea0755d6deabaf88c9ef26039b2f27):
>
> Appending to array: n= 1048576 iterations= 20 memory=33558608
> bytes, create+destroy time=0.369 read time
Hi Christian Schenider,
> First of all: I don't have a strong opinion on a Vector class being useful or
> necessary.
>
> But I have two comments about this RFC:
>
> 1. Using the very generic name Vector without any prefix/namespace seems
> dangerous and asking for BC breaks.
I downloaded the
Hi Levi Morrison,
> I mean that there isn't a way to provide a custom way to compare for
> equality. One way to accomplish this is to have a signature like:
>
> function contains(T $value, ?callable(T, T):bool $comparator = null): bool
>
> The same goes for `indexOf`.
It'd make much more sen
Hi Pierre,
> That's nice, and I like it, but like many people I will argue about the
> API itself.
>
> One thing is that there's many methods in there that would totally fit
> generic collection common interfaces, and in that regard, I'd be very
> sad that it would be merged as is.
It isn't an
Hey Marco Pivetta,
> Would it perhaps make sense to drag in php-ds, which has matured quite a bit
> over the years? I'm referring to:
> https://www.php.net/manual/en/class.ds-sequence.php
>
> Is what you are suggesting with `Vector` different from it?
>
> Note: For some reason, I can't quote y
Hi Levi Morrison,
> I'm okay with a final Vector class in general. I don't love the
> proposed API but don't hate it either. Feedback on that at the end.
>
> What I would _love_ is a `vec` type from hacklang, which is similar to
> this but pass-by-value, copy-on-write like an array. Of course, th
Hi internals,
I've created a new RFC https://wiki.php.net/rfc/vector proposing to add `final
class Vector` to PHP.
PHP's native `array` type is rare among programming language in that it is used
as an associative map of values, but also needs to support lists of values.
In order to support both
Hi Nikita Popov,
> I'd like to propose the deprecation of "dynamic properties", that is
> properties that have not been declared in the class (stdClass and
> __get/__set excluded, of course):
>
> https://wiki.php.net/rfc/deprecate_dynamic_properties
>
> This has been discussed in various forms i
Hi Craig Francis,
> As an aside, only 4 of 23 'no' voters provided any comment as to why they
> voted that way on the mailing list, which I feel undermines the point of
> the Request For Comment process, with an additional 5 responding personally
> off-list after prompting. This makes it harder (o
> > The FFI Type Reflection API mentioned in
> > https://externals.io/message/115336 was recently added
> >
> > My opinion is that that they should be renamed to use the same naming
> > scheme that PHP's Reflection extension is already using.
> > Having different ways of naming very similar conc
Hi internals,
The FFI Type Reflection API mentioned in https://externals.io/message/115336
was recently added
My opinion is that that they should be renamed to use the same naming scheme
that PHP's Reflection extension is already using.
Having different ways of naming very similar concepts (dif
Hello Kim Hallberg,
> The RFC for the clamp function is now open and under discussion, you now have
> 2 weeks
> to discuss, suggest improvements and open issues before voting is considered.
>From https://wiki.php.net/rfc/clamp -
> Current userland implementations are handled in several ways,
Hi Kim Hallberg,
> The RFC for the clamp function is now open and under discussion, you now have
> 2 weeks
> to discuss, suggest improvements and open issues before voting is considered.
>
> Any and all feedback is welcomed.
>
> The RFC is available for viewing here: https://wiki.php.net/rfc/c
Mi Marco Pivetta,
> I'm opening the vote for making `Reflection*#setAccessible()`.
>
> Voting starts today (2021-06-23) and ends in 14 days (2021-07-07).
>
> Vote at https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
>
> Discussion: https://marc.info/?l=php-internals&m=162360269505048
Hi George P. Banyard,
> With Ilija we are proposing a short RFC to deprecate coercion from bool to
> string:
> https://wiki.php.net/rfc/deprecate-boolean-string-coercion
>
> As this is the final day for any RFC to be even able to land in PHP 8.1
> the voting is expected to start in two weeks on t
Hi Mel Dafert,
> >I would prefer an improved syntax for creation of anonymous objects. This
> >is something which I have been annoyed with, myself.I'd like to see a
> >simple way of creating anonymous objects with typed properties.
>
> Another advantage arrays currently have over anonymous object
Hi Christian Schneider,
> > return [success: true, data: $data, cursor: $cursor];
> > // is equivalent to the following, but shorter:
> > return ['success' => true, 'data' => $data, 'cursor' => $cursor];
>
> Just a little side-note: A while ago I proposed a 2-line-patch to allow :$foo
> as a syn
Hi Rowan Tommins,
> This is an immediate "no" from me: it multiplies the ways to write the
> same thing from 2 to 4, in order to save a few bytes, in a few instances.
It's from 4 to 6 if you include single quoted strings vs double quoted strings.
If linters and automatic fixers were set up for a
Hi internals,
In every place where `key` is a valid php identifier
(e.g. can be used in PHP 8.0's named parameters),
I propose to allow `[key: expr]` to be used instead of `['key' => expr]`.
(including `list(key: expr)` and `array(key: expr)`
(This can be mixed anywhere with existing key/value syn
Hi Larry Garfield,
Thanks for responding.
> While I like the idea of an immutable collection, and the performance boost
> seems useful, this proposal seems to go about it in a sloppy way.
>
> 1) Iterable doesn't seem like the right "family" for this. It is iterable,
> but so are lots of other
Hi Nikita,
> I like the concept here. I think the naming choice is unfortunate, and
> causing confusion for people.
>
> What you're really proposing here is a data structure: A sequence of
> key-value-pairs. That generally seems like a sensible thing to have, in that
> we can implement it sign
Hi Thomas Bley,
> Maybe better use "IterableImmutable" to be more consistent with
> "DateTimeImmutable"?
1. Replies won't show up on list if they aren't sent to internals@lists.php.net
2. I consider the name DateTimeImmutable a mistake (but one that isn't worth
fixing).
If it was done from
Hi Marco Pivetta,
> I see the RFC as valuable but:
>
> * `__serialize` and `__unserialize` are out of scope: this depends on the
>contents of it, and there's no point in implementing them
> * `__set_state` should also not be implemented: `var_export()` like any other
>object and it should be fi
Hi internals,
Voting has started on the ImmutableIterable RFC
https://wiki.php.net/rfc/cachediterable
Previous discussion can be found in https://externals.io/message/114834
Recent changes:
- The name was renamed to `ImmutableIterable` to indicate that it cannot be
changed after being construc
Hi Marco Pivetta,
> I'm posting here to introduce a new simplification, as well as
> quality-of-life-improving RFC:
>
> https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
>
> The RFC is quite minimal, and proposes removing any runtime behavior from
> `ReflectionMethod#setAccessible()`
Hi internals,
> > > So I'm probably changing this to `ImmutableTraversable` as a short name
> > > for the functionality,
> > > to make it clear arguments are eagerly evaluated when it is created.
> > > (ImmutableSequence may be expected to only contain values, and would be
> > > confused with th
Hi Alex,
> > I've created a new RFC https://wiki.php.net/rfc/cachediterable adding
> > CachedIterable,
> > which eagerly evaluates any iterable and contains an immutable copy of the
> > keys and values of the iterable it was constructed from
> >
> > A heads up - I will probably start voting on
Hi Levi Morrison,
> > > Hi internals,
> > >
> > > > I've created a new RFC https://wiki.php.net/rfc/cachediterable adding
> > > > CachedIterable,
> > > > which eagerly evaluates any iterable and contains an immutable copy of
> > > > the keys and values of the iterable it was constructed from
> >
Hi internals,
> I've created a new RFC https://wiki.php.net/rfc/cachediterable adding
> CachedIterable,
> which eagerly evaluates any iterable and contains an immutable copy of the
> keys and values of the iterable it was constructed from
>
> This has the proposed signature:
>
> ```
> final cl
Hi Kamil,
> I have reworked the RFC based on some feedback. The improved RFC now will
> hold 2 votes. One vote to decide whether the behaviour should be deprecated
> from false, and another from null.
>
> If there are no objections then I would like to start the votes in a couple
> of days.
>
>
Hi internals,
Voting has started on https://wiki.php.net/rfc/cachediterable_straw_poll and
ends in a week on June 12, 2021
(the voting period is shorter because this is a poll, not an RFC, and the
feature freeze is soon)
Previously, https://wiki.php.net/rfc/namespaces_in_bundled_extensions pass
Hi internals,
Recently, there have been 3 proposals to add functionality related to
iterables/iterators to the standard library where voting was postponed for
reasons related to namespacing policy:
1. https://wiki.php.net/rfc/any_all_on_iterable - where major objections were
not having enough
Hi internals,
I have opened the vote on https://wiki.php.net/rfc/enum_allow_static_properties
Voting ends on June 15, 2021
Previous discussion can be found at https://externals.io/message/114494
Thanks,
Tyson
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://
Hi internals,
> I've created a new RFC https://wiki.php.net/rfc/enum_allow_static_properties
>
> Although enums are immutable objects, it is often useful to have functions or
> methods that operate on enum instances.
> In many cases, it would make sense to declare that functionality as static
>
> > On Mon, May 17, 2021, at 9:16 AM, Michał Marcin Brzuchalski wrote:
> > > pon., 17 maj 2021, 16:02 użytkownik tyson andre <
> > tysonandre...@hotmail.com>
> > > napisał:
> > >
> > > > Hi internals,
> > >
Hi internals,
I've created a new RFC https://wiki.php.net/rfc/enum_allow_static_properties
Although enums are immutable objects, it is often useful to have functions or
methods that operate on enum instances.
In many cases, it would make sense to declare that functionality as static
methods on
Hi Marco Pivetta,
> > In fact, if reflection were to switch to the actual runtime return types of
> > those methods, I don't see a reason why downstream consumers would break
> > (stubbing tools, code generators, type checkers, dependency solvers, etc.)
>
> If the published library/application ha
Hi Marco Pivetta,
> In fact, if reflection were to switch to the actual runtime return types of
> those methods, I don't see a reason why downstream consumers would break
> (stubbing tools, code generators, type checkers, dependency solvers, etc.)
If the published library/application had to suppo
> > The question of namespaces in the stdlib has been coming up a lot recently,
> > so I'd like to present my own stab at resolving this question:
> >
> > https://wiki.php.net/rfc/namespaces_in_bundled_extensions
> >
> > Relative to a number of previous (declined) proposals, the main difference
> >
Hi internals,
> I've created a new RFC https://wiki.php.net/rfc/debug_backtrace_depth to
> return the depth of the current stack trace.
>
> Inspecting the current stack trace depth is occasionally useful for
> 1. Manually debugging with temporary debug statements
> 2. Checking for potential infi
Hi Nikita Popov,
> The question of namespaces in the stdlib has been coming up a lot recently,
> so I'd like to present my own stab at resolving this question:
>
> https://wiki.php.net/rfc/namespaces_in_bundled_extensions
>
> Relative to a number of previous (declined) proposals, the main differen
Hi Rowan,
> Hi Tyson,
>
> I'm on the fence on this one: I've certainly had occasions when it would
> be useful, but mostly in quick prototypes and demo code, and just as
> often in HTML context (where I'd want it to add '') as plain text
> context.
>
> I am not keen, however, on the proposed
Hi Levi Morrison,
> > Hello!
> >
> > Most of PHP's symbols are case insensitive. This means extensions that
> > need to do things with function and method names end up lowercasing
> > and hashing the lowercased names, often having to do more memory
> > allocations too. Since case insensitive symbo
> Hi Tyson,
>
> I like this proposal, but why is the main argument optional? Wouldn't it
> make sense to always require a string as an argument?
>
> Regards,
> Kamil
I initially considered making it required, but then I felt like there wasn't a
compelling reason to force end users
to write `pri
Hi internals,
I've created a new RFC https://wiki.php.net/rfc/println
This proposes adding a global function to PHP to
print a string followed by a unix newline (`\n`).
Printing a string followed by a newline to stdout is a commonly performed
operation in many applications and programming langu
Hi internals,
I've created a new RFC https://wiki.php.net/rfc/debug_backtrace_depth to return
the depth of the current stack trace.
Inspecting the current stack trace depth is occasionally useful for
1. Manually debugging with temporary debug statements
2. Checking for potential infinite recursi
Hi Rowan Tommins,
> I would like to propose we formally deprecate the function debug_zval_dump
> and remove it in PHP 9.0.
>
> This function is mostly similar to var_dump, with the additional ability to
> output the refcount of a variable. This has always been hard to interpret,
> but is now s
; I will be proposing new types for ext/spl soon (ReverseIterator
> > and an array iterator that is more efficient than \ArrayIterator),
> > and Tyson Andre has already proposed CachedIterable and company
> > which is in ext/spl, so this space has active development.
> > Thank yo
Hi Alex,
> > I've created a new RFC https://wiki.php.net/rfc/cachediterable adding
> > CachedIterable,
> > which eagerly evaluates any iterable and contains an immutable copy of the
> > keys and values of the iterable it was constructed from
> >
> >
> > Any other feedback unrelated to namespaces
Hi internals,
> I've created a new RFC https://wiki.php.net/rfc/cachediterable adding
> CachedIterable,
> which eagerly evaluates any iterable and contains an immutable copy of the
> keys and values of the iterable it was constructed from
>
> This has the proposed signature:
>
> ```
> final cl
Hi internals,
I've created a new RFC https://wiki.php.net/rfc/cachediterable adding
CachedIterable,
which eagerly evaluates any iterable and contains an immutable copy of the keys
and values of the iterable it was constructed from
This has the proposed signature:
```
final class CachedIterable
hing.
- This is different in that there's only 2 desired values.
https://wiki.php.net/rfc/stable_sorting fixed that calling it twice and
deprecating booleans.
It still allows you to return strings (not likely in practice) and casts those
to integers.
"Second, if boolean false is returned, PHP will automatically call the
comparison function again with arguments swapped.
This allows us to distinguish whether the “false” stood for “equal” or “smaller
than”. This fallback behavior should be removed in a future version of PHP."
> Anyway, to me it feels natural that any()/all() would "work" like
> array_filter().
>
> @Tyson by the way, in the any()/all() case (vs the any_value()/all_values()
> and potential any_key()/all_keys() etc.), wouldn't it be preferable to add
> the optional `int $flags = 0` (or "$mode") parameter right from the start
> (even if not used yet), as adding it in a later release would apparently pose
> some BC concerns (ArgumentCountError, polyfills etc.)?
If an iterables RFC passed, and all amendments got approved before 8.1 stable
was released, it wouldn't matter. There's months before the feature freeze.
If a function was added with flags "just in case" in 8.1 stable and we never
used the flags, we'd have to deprecate them and remove them in a subsequent
major release.
I don't think that's worth it.
Cheers,
Tyson Andre
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
Hi Larry Garfield,
> > Hi Larry Garfield,
> >
> > > > Hi internals,
> > > >
> > > > Voting has started on https://wiki.php.net/rfc/any_all_on_iterable and
> > > > ends on 2021-02-22.
> > > >
> > > > This RFC proposes to add the functions `PHP\iterable\any(iterable
> > > > $input, ?callable $c
Hi internals,
> Voting has started on https://wiki.php.net/rfc/any_all_on_iterable and ends
> on 2021-02-22.
>
> This RFC proposes to add the functions `PHP\iterable\any(iterable $input,
> ?callable $callback = null): bool` and `PHP\iterable\all(...)`
> to PHP's standard library's function set,
Hi Levi Morrison,
> > Hi internals,
> >
> > Voting has started on https://wiki.php.net/rfc/any_all_on_iterable and ends
> > on 2021-02-22.
> >
> > This RFC proposes to add the functions `PHP\iterable\any(iterable $input,
> > ?callable $callback = null): bool` and `PHP\iterable\all(...)`
> > to P
Hi Larry Garfield,
> > Hi internals,
> >
> > Voting has started on https://wiki.php.net/rfc/any_all_on_iterable and
> > ends on 2021-02-22.
> >
> > This RFC proposes to add the functions `PHP\iterable\any(iterable
> > $input, ?callable $callback = null): bool` and `PHP\iterable\all(...)`
> > t
Hi internals,
Voting has started on https://wiki.php.net/rfc/any_all_on_iterable and ends on
2021-02-22.
This RFC proposes to add the functions `PHP\iterable\any(iterable $input,
?callable $callback = null): bool` and `PHP\iterable\all(...)`
to PHP's standard library's function set, using the n
Hi internals,
> I've created an RFC for https://wiki.php.net/rfc/any_all_on_iterable
>
> This was proposed 2 days ago in https://externals.io/message/111711 with some
> interest
> ("Proposal: Adding functions any(iterable $input, ?callable $cb = null, int
> $use_flags=0) and all(...)")
>
> - Th
Hi internals,
Voting has started today on https://wiki.php.net/rfc/readable_var_representation
and closes on 2021-02-19.
This RFC proposes introducing a new function `var_representation`
with the following differences from var_export:
1. `var_representation()` unconditionally returns a string
2.
Hi internals,
> > > I've created https://wiki.php.net/rfc/readable_var_representation based on
> > > my original proposal in https://externals.io/message/112924
> > >
> > > This RFC proposes adding a new function `var_representation(mixed $value,
> > > int $flags=0): string`
> > > with the follo
Hi internals,
> > > I've created https://wiki.php.net/rfc/readable_var_representation based on
> > > my original proposal in https://externals.io/message/112924
> > >
> > > [...]
> >
> > A reminder that voting on the var_representation RFC starts in a day.
> > This RFC proposes adding a new func
1 - 100 of 366 matches
Mail list logo