PHP has always treated function, method, and class names as case-insensitive. That was a pragmatic early design decision, but it now creates inconsistency witho...
The trim(), ltrim(), and rtrim() functions strip whitespace (or other characters) from the beginning and end of a string. When the second parameter ($characters...
This RFC aims to clarify and codify the rules regarding backward compatibility and userland API compatibility in PHP minor versions. Currently, there is no form...
The PHP array sort functions take the array to sort as a by-reference array to sort the array in place.
However, since PHP 5.6 these function have only ever ret...
The only way to pass the default value to a function or method parameter is to not pass anything. This can be particularly difficult in some circumstances, beca...
The PHP project has had a long-standing but unwritten, vague, and inconsistently applied proscription against mentioning or using third-party PHP projects on th...
The engine currently doesn't allow enums to implement Stringable. This RFC proposes that string-backed enums auto-implement Stringable, while still disallowing ...
Parameters in PHP are contravariant to preserve Liskov substitution. This means that if class B extends class A, then redefines a function call, the entire type...
After a foreach by reference loop, the value variable currently remains a reference to the last array element, which may result in unexpected behavior if the va...
clamp checks if a int|float value is within a certain bound. If the value is in range it returns the value, if the value is not in range it returns the nearest ...
PHP offers a function for parsing query string into an array. The function, for historical reasons, has been designed to allow registering the values as global ...
Ticks allow running a function for every N low-level tickable statements. Historically, they have been used for handling pcntl signals. However, they have outli...
Inspecting the current stack trace depth is occasionally useful for manually debugging, checking for potential infinite recursion, or for checking if code would...
Printing a string followed by a newline to stdout is a commonly performed operation in many applications. Many programming languages provide a helper function t...
On most platforms, PHP currently measures the request timeout based on CPU time, rather than wall-clock time, so neither sleep(), nor network or system calls co...
Intuitively, the ++ and -- operators are equivalent to add 1 to variable and subtract 1 from variable, respectively. As such, it would be expected that $a=$a+1,...
Currently, constant expressions in declarations allow a limited set of expression types such as literals, constants, and operations.
This RFC proposes allowing ...
The current design of PHP's switch statement follows closely languages such as C/C++ and supports fall-through semantics by default.
The traditional switch stat...
In PHP most types are consistent; a float is a float whether it is in a function, in a static method, or is a global variable. Ints, bools, resource, strings et...
Object properties in PHP are primarily defined in class definitions; however, they can also be added to or removed from individual instances at any time. This R...
For many years, we receive bug reports regarding the strange behavior of the $escape parameter of our CSV writing and reading functions (fputcsv, fgetcsv etc.);...
In PHP, if continue is applied to a switch statement, it behaves the same as break. In other languages, it would continue the surrounding loop instead. To avoid...
WDDX has been designed as programming language independent data exchange format for the web1). However, PHP 4.0.0 added the ability to (de)serialize class insta...
Introduce namespaces to user-level symbols to avoid collisions with user defined symbols, decrease breaking changes due to the introduction of new symbols and t...
Anonymous functions and closures can be verbose even though sometimes they are quite simple and contain only a single expression. Additionally, importing variab...
PHP's implementation of ICU is still incomplete. One of the features currently missing is a wrapping of UCharsetDetector meant to make an educated guess as to ...
PHP presently offers the ability to import class-like structures (classes, interfaces and traits) via a callback (or series of them) that can be registered. Thi...
JSON in php currently supports the Serialization of objects using the \JsonSerializable interface. However it does not support the unserialization of JSON strin...
Anonymous functions, also known as closures, allow the creation of functions which have no specified name. They are most useful as the value of callback paramet...
This RFC proposes to conditionally add a strict argument count check for function calls on PHP7, being sensitive towards implementations already depending on th...
Should PHP7 warn about exceeding argument count on function calls?
Yes
No
Yes
2 Votes (11%)
No
17 Votes (89%)
What's the error level that should be emitted?
Adds a new method to ReflectionParameter to allow easy access to a class name in a type hint, avoiding the need to actually load the class and use `getClass()->...
There is currently no way to make a property readable to everyone and writeable only to the containing object, with PHP's visibility specifiers allowing all or ...
For the longest time, PHP has lacked first-class functions. Because of the separate namespaces, functions and methods can't be dealt with directly like other ar...
Since the beginning, PHP has had only two numeric types: integer, and float. The former has been a platform-dependent C long, usually either 32-bit or 64-bit, a...
Note: Previously, here was a description of the issues related to the 'read_only' option, which was later renamed to 'read_and_close', effectively solving the p...
Sadly, Anthony Ferrara decided to stop developing PHP and withdrew all of his RFCs. Since I liked this one, I am re-opening it here. The original RFC was at htt...
This RFC brings static scalar expressions to the parser. This allows places that only take static values (const declarations, property declarations, function ar...
Currently PHP uses an enforced interface style, where the argument object to a function or method must implement the respective interface. This RFC discusses in...
When localhost is set as the mysql host, the connection is set to connect to the specified socket. If no socket is set the hardcoded default of /tmp/mysql.sock ...
Currently, PHP has no way to provide type hinting for function parameters which are not classes or arrays. This is on often requested feature that has been disc...
Currently, PHP has no way to provide type hinting for function parameters which are not classes or arrays. This is on often requested feature that has been dis...
The purpose behind this RFC is to introduce return type hinting to PHP class methods. This RFC differs from the existing entry with a completely different conc...
The original voting RFC has left open some questions about who can vote, and how are the community representatives selected/elected.
These shortcomings were bro...
PHP 8.1 introduced Deprecate passing null to non-nullable arguments of internal functions. While the consistency is welcome (user-defined vs internal functions)...
Both php_rand() and php_mt_rand() internal function provides pseudo random numbers. php_rand() uses system random function which has less randomness compare to ...
There session_module_name(), mb_regex_encoding(), etc that get/set INI values. These functions are duplicate of ini_get()/ini_set(). In addition, INI name and f...
Currently, the Zend Engine exposes several methods to PECL extensions and internal classes to control how internal objects behave when casting to primitives, an...