Home » Community » People » tandre »
tandre

tandre

Contributor Directory

RFCs

Language and policy proposals from this contributor
RFCs are part of the process by which decisions are made about PHP. For more information about the RFC process as well as viewing a full list of RFCs please visit the RFC section.

Add array_is_list(array $array): bool

Author
Target
8.1
PHP's array data type is rare in that it supports both integer and string keys, and that iteration order is guaranteed. While it is possible to efficiently chec...

Add the function array_is_list(array $array): bool to PHP?

Yes
No
Yes
41 Votes (98%)
No
1 Votes (2%)

Don't automatically unserialize Phar metadata outside getMetadata()

Author
Target
8.0
In 2018, various vulnerabilities were found in php web frameworks due to the phar stream wrappers. A call such as file_exists("phar://...somepath.extension/file...

Stop automatically unserializing Phar metadata outside direct getMetadata() calls

Yes
No
Yes
25 Votes (100%)
No
0 Votes (0%)

Allow trailing comma in closure use lists

Author
Target
8.0
This RFC proposes to allow an optional trailing comma in closure use lists. This is already supported for argument and parameter lists.

Allow trailing comma in closure use lists

Yes
No
Yes
49 Votes (100%)
No
0 Votes (0%)

zend.exception_string_param_max_len: Configurable string length in getTraceAsString()

Author
Target
8.0
Since 2003, Throwable->getTraceAsString() and Throwable->__toString() have limited the length of string function arguments in stringified stack traces to 15 byt...

Add a new ini setting zend.exception_string_param_max_len

Yes
No
Yes
36 Votes (95%)
No
2 Votes (5%)

Informal poll: Interest in raising the default string parameter max length from 15 bytes in future RFCs

Yes
No
Yes
11 Votes (33%)
No
22 Votes (67%)

Always available JSON extension

Author
Target
8.0
Currently, it's possible to disable the json extension with ./configure --disable-json. However, JSON is extremely useful to have because it's widely used for m...

Make the JSON extension impossible to disable

Yes
No
Yes
56 Votes (100%)
No
0 Votes (0%)

ImmutableIterable (immutable, rewindable, memory-efficient, allows any key&repeating keys)

Author
Currently, PHP does not provide a built-in way to store the state of an arbitrary iterable for reuse later (when the iterable has arbitrary keys, or when keys m...

Add ImmutableIterable to core

Yes
No
Yes
2 Votes (18%)
No
9 Votes (82%)

Reasons for voting against the ImmutableIterable RFC

Object to the namespace choice
Object to the name
Object to the implementation
Don't see a use case
Other
Object to the namespace choice
1 Votes (7%)
Object to the name
5 Votes (33%)
Object to the implementation
3 Votes (20%)
Don't see a use case
0 Votes (0%)
Other
6 Votes (40%)

Allow static properties in enums

Author
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 decl...

Allow static properties in enums

Yes
No
Yes
8 Votes (32%)
No
17 Votes (68%)

PHP\iterable\any() and all() on iterables

Author
The primitives any() and all() are a common part of many programming languages and help in avoiding verbosity or unnecessary abstractions.

Add PHP\iterable\any() and all() to PHP?

Yes
No
Yes
11 Votes (48%)
No
12 Votes (52%)

Names to use: any()/all() or any_value()/all_values()

any()/all()
any_value()/all_values()
any()/all()
14 Votes (82%)
any_value()/all_values()
3 Votes (18%)

Reasons for voting against this RFC

Too small in scope
Object to the choice of namespace
Prefer the global namespace
Confused about the implementation
Prefer userland solutions
Other
Voted for this RFC
Too small in scope
5 Votes (23%)
Object to the choice of namespace
4 Votes (18%)
Prefer the global namespace
3 Votes (14%)
Confused about the implementation
1 Votes (5%)
Prefer userland solutions
3 Votes (14%)
Other
1 Votes (5%)
Voted for this RFC
5 Votes (23%)

var_representation() : readable alternative to var_export()

Author
var_export() is a function that gets structured information about the given variable. It is similar to var_dump() with one exception: the returned representatio...

Add var_representation($value, int $flags=0): string to php?

Yes
No
Yes
9 Votes (47%)
No
10 Votes (53%)

Dump results of expressions in `php -a`

Author
Many REPLs (Read-Eval-Print Loops) for other programming languages that I'm familiar with print a (possibly truncated) representation of the result of expressio...

Dump results of expressions in `php -a` as described in this RFC

Yes
No
Yes
11 Votes (65%)
No
6 Votes (35%)

Opcache optimization without any caching

Author
Currently, it isn't possible to enable optimizations without enabling caching. They should be orthogonal features - it's already possible to cache without optim...

Add opcache.allow_cache ini setting to support opcode optimization without caching

Yes
No
Yes
10 Votes (43%)
No
13 Votes (57%)

If you voted no on opcache.allow_cache, why?

1
2
3
4
1
8 Votes (100%)
2
0 Votes (0%)
3
0 Votes (0%)
4
0 Votes (0%)

I would be interested in moving opcode optimizations into core

Yes
No
Yes
14 Votes (100%)
No
0 Votes (0%)

declare(function_and_const_lookup='global')

Author
When calling a function or using a constant that isn't fully qualified from a namespace (other than the global namespace), PHP will check these two locations in...

Support declare(function_and_const_lookup=...)

Yes
No
Yes
2 Votes (5%)
No
35 Votes (95%)

Severity of redundant uses of global functions/constants

Warning
Fatal Error
Allow and don't warn
Warning
4 Votes (19%)
Fatal Error
10 Votes (48%)
Allow and don't warn
7 Votes (33%)

debug_backtrace_depth(int $limit=0): int

Author
Inspecting the current stack trace depth is occasionally useful for manually debugging, checking for potential infinite recursion, or for checking if code would...

Allow function calls in constant expressions

Author
Currently, constant expressions in declarations allow a limited set of expression types such as literals, constants, and operations. This RFC proposes allowing ...

final class Collections\Deque

Author
While SplDoublyLinkedList and its subclass SplQueue/SplStack exist in the SPL, they have several drawbacks (that are addressed by this RFC to add a Deque class)...

final class Vector

Author
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 ord...