Implemented in PHP 8.4

RFC Categories

    Add bcdivmod to BCMath

    Author
    Target
    8.4
    BCMath has bcdiv() and bcmod(), and the operation must be performed twice to obtain both the quotient and remainder. This is also true for the BcMath\Number cla...

    Add bcdivmod to BCMath

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

    Fix up BCMath Number Class / Change GMP bool cast behavior

    Author
    Target
    8.4
    Regarding RFC: Support object type in BCMath, I received several comments and suggestions, so I created this RFC to respond to them.

    Fix up BCMath Number Class

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

    Change GMP bool cast behavior

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

    Property hook improvements

    Author
    Author
    Target
    8.4
    While finalizing the implementation of the property hooks RFC patch, we have found a small area for improvement. This is nominally changes from the behavior de...

    Remove the extra hook recursion guard?

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

    Lazy Objects

    Author
    Author
    Target
    8.4
    Transparent lazy-initialization of objects is an important part of many PHP applications. However, achieving this kind of laziness in userland is complex, limit...

    Add lazy-objects as described to the engine

    Yes
    No
    Yes
    26 Votes (84%)
    No
    5 Votes (16%)

    Asymmetric Visibility v2

    Author
    Author
    Target
    8.4
    PHP has long had the ability to control the visibility of object properties -- public, private, or protected. However, that control is always the same for both...

    Implement asymmetric visibility?

    Yes
    No
    Yes
    24 Votes (77%)
    No
    7 Votes (23%)

    Transform exit() from a language construct into a standard function

    Author
    Target
    8.4
    The exit language construct (and its alias die) can be used on its own without parentheses 1) to terminate a PHP script with status code 0, or it can be used l...

    Accept Transform exit() from a language construct into a standard function RFC?

    Yes
    No
    Yes
    24 Votes (67%)
    No
    12 Votes (33%)

    #[\Deprecated] Attribute

    Author
    Benjamin Eberlei
    Author
    Tim Düsterhus
    Target
    8.4
    PHPs internal functions and (class-)constants can be marked as deprecated, making this information available to Reflection and emitting deprecation errors (E_DE...

    Implement the #[\Deprecated] attribute?

    Yes
    No
    Yes
    23 Votes (79%)
    No
    6 Votes (21%)

    Include the Deprecated::$since property?

    Yes
    No
    Yes
    22 Votes (96%)
    No
    1 Votes (4%)

    Correctly name the rounding mode and make it an Enum

    Author
    Author
    Target
    8.4
    There are eight rounding modes in the current master branch (8.4):

    Add the RoundingMode enum as described?

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

    Add stream open functions to XML{Reader,Writer}

    Author
    Target
    8.4
    The XMLReader and XMLWriter classes deal with XML in a stream-oriented manner. The former implements an XML pull parser. This means that instead of keeping the ...

    Accept adding the methods from the Main Proposal section?

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

    Accept adding the methods from the Consistency section?

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

    New ext-dom features in PHP 8.4

    Author
    Target
    8.4
    The PHP 8.4 development cycle has seen two major improvements to the ext-dom extension already: HTML 5 support, and opt-in spec compliance. This RFC is (probabl...

    Accept PHP 8.4 DOM additions RFC?

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

    PDO Driver specific SQL parsers

    Author
    Target
    8.4
    The PDO extension contains a SQL parser, whose main purpose is to recognise parameter placeholders inside queries (i.e. ? and :paramName), so that it knows how ...

    Implement PDO Driver specific SQL parsers?

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

    array_find

    Author
    Target
    8.4
    This RFC proposes the addition of new array functions: array_find, array_find_key, array_any and array_all, which are helper functions for common patterns of ch...

    Add array_find() and array_find_key()?

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

    Add array_any() and array_all()?

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

    Support object type in BCMath

    Author
    Target
    8.4
    BCMath currently only supports procedural functionality and does not support object types. Object-based programming is mainstream these days, so it's a bit outd...

    Support object type in BCMath

    Yes
    No
    Yes
    18 Votes (86%)
    No
    3 Votes (14%)

    Initial value for implicit rounding mode

    PHP_ROUND_HALF_UP
    PHP_ROUND_TOWARD_ZERO
    PHP_ROUND_HALF_UP
    16 Votes (94%)
    PHP_ROUND_TOWARD_ZERO
    1 Votes (6%)

    Grapheme cluster for str_split function: grapheme_str_split

    Author
    Yuya Hamada
    Target
    8.4
    I noticed PHP does not have a grapheme cluster based str_split function. So I think need str_split for grapheme cluster, grapheme_str_split function using ICU. ...

    Add grapheme cluster for str_split function: grapheme_str_split

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

    Deprecate GET/POST sessions

    Author
    Target
    8.4
    PHP supports two ways to propagate session token ID: via cookies and through GET or POST parameters. Cookies are the default preferred method that has become th...

    Accept Deprecate GET/POST session identifiers

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

    Dedicated StreamBucket class

    Author
    Target
    8.4
    When using user filters for stream processing, one of the fundamental concepts is stream buckets. A stream bucket is effectively a chunk of stream which can be ...

    Add the StreamBucket class as proposed?

    yes
    no
    yes
    20 Votes (100%)
    no
    0 Votes (0%)

    Multibyte for ucfirst, lcfirst functions, mb_ucfirst mb_lcfirst

    Author
    Author: Yuya Hamada
    Target
    8.4
    PHP does not have a multibyte equivalent of ucfirst, lcfirst functions. It is possible to get close enough behavior below:

    Add mb_ucfirst and mb_lcfirst functions

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

    Opt-in DOM spec-compliance

    Author
    Target
    8.4
    The DOM extension in PHP is used to parse, query, and manipulate XML/HTML documents. The DOM extension is supposed to follow the DOM specification. Originally t...

    Accept Opt-in DOM spec-compliance RFC?

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

    Raising zero to the power of negative number

    Author
    Jorg Sowa
    Target
    8.4
    Raising a number to the power of a negative number is equivalent to taking the reciprocal of the number raised to the positive opposite of the power.

    RFC: Raising zero to the power of negative number

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

    Add http_(get|clear)_last_response_headers() function

    Author
    Target
    8.4
    The $http_response_header variable is magically created in the local scope whenever an HTTP request is performed through PHP's stream layer, i.e. when using the...

    Accept Add http_(get|clear)_last_response_headers() function RFC?

    Yes
    No
    Yes
    15 Votes (94%)
    No
    1 Votes (6%)

    new MyClass()->method() without parentheses

    Author
    Valentin Udaltsov
    Target
    8.4
    The class member access on instantiation feature was introduced in PHP 5.4.0. Since then constants, properties and methods can be accessed on a newly created in...

    Allow to omit parentheses around the new expression as described?

    Yes
    No
    Yes
    25 Votes (86%)
    No
    4 Votes (14%)

    Deprecate implicitly nullable parameter types

    Author
    Author
    Target
    8.4
    PHP supports nullable type declarations as of PHP 7.1 with the ?T syntax, and with the T|null syntax as of PHP 8.0 when generalized support for union types was ...

    Accept Deprecate implicitly nullable parameter types RFC?

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

    Improve callbacks in ext/dom and ext/xsl

    Author
    Target
    8.4
    The DOMXPath class allows developers to run XPath expression queries on HTML/XML documents. The XSLTProcessor class allows developers to perform XSL transformat...

    Accept the proposed changes to registerPhpFunctions in ext/dom and ext/xsl?

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

    Add registerPhpFunctionNS to ext/dom and ext/xsl?

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

    Multibyte for trim function mb_trim, mb_ltrim and mb_rtrim

    Author
    Yuya Hamada
    Target
    8.4
    PHP does not have a multibyte equivalent of the trim function. It is possible to get close enough behavior using preg_replace(/^\s+|\s+$/u, '', $string), howeve...

    Multibyte for trim function mb_trim, mb_ltrim and mb_rtrim

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

    Introduce request_parse_body() in PHP 8.4?

    Yes
    No
    Yes
    23 Votes (96%)
    No
    1 Votes (4%)

    Unbundle ext/imap, ext/pspell, ext/oci8, and ext/PDO_OCI

    Author
    Target
    8.4
    PHP currently bundles the ext/imap, ext/pspell, ext/oci8, and ext/PDO_OCI extensions, which all suffer from issues with external dependencies.

    Unbundle ext/imap

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

    Unbundle ext/pspell

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

    Unbundle ext/oci8 and ext/PDO_OCI

    Yes
    No
    Yes
    26 Votes (96%)
    No
    1 Votes (4%)

    Adding bcround, bcfloor and bcceil to BCMath

    Author
    Saki Takamachi
    Target
    8.4
    As you know, BCMath is an arbitrary precision mathematical function that supports exact calculations. As of the writing of this RFC, nine calculation functions ...

    Adding bcround, bcfloor and bcceil to BCMath

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

    XML_OPTION_PARSE_HUGE

    Author
    Target
    8.4
    ext/xml allows the user to parse XML in an event-driven way (SAX). The user can register callbacks to be called when certain nodes are encountered while parsing...

    Add XML_OPTION_PARSE_HUGE parsing option

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

    Increasing the default BCrypt cost

    Author
    Target
    8.4
    PHP's default BCrypt cost for password_hash is unchanged since the addition of the password hashing API in PHP 5.5 which was 11 years ago.

    Increase the default BCrypt cost?

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

    Increase the default BCrypt cost to?

    11 (less than 160ms per hash)
    12 (less than 330ms per hash)
    11 (less than 160ms per hash)
    12 Votes (46%)
    12 (less than 330ms per hash)
    14 Votes (54%)

    Add 4 new rounding modes to round() function

    Author
    Jorg Sowa
    Target
    8.4
    The RFC proposes to add 4 new modes to the round() function.

    Implement 4 new rounding modes to `round()` function

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

    Create aliases for Intl extension constants ROUND_UP and ROUND_DOWN: ROUND_AWAY_FROM_ZERO and ROUND_TOWARD_ZERO

    Yes
    No
    Yes
    10 Votes (63%)
    No
    6 Votes (38%)

    DOM HTML5 parsing and serialization

    Author
    Target
    8.4
    Important: parts of this RFC were further enhanced by https://wiki.php.net/rfc/opt_in_dom_spec_compliance

    Introduce the proposed DOM classes and namespace aliases

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

    DOM\HTMLDocument::fromFile should respect the resolver set by libxml_set_external_entity_loader

    Yes
    No
    Yes
    1 Votes (9%)
    No
    10 Votes (91%)

    Property hooks

    Author
    Author
    Target
    8.4
    Developers often use methods to wrap and guard access to object properties. There are several highly common patterns for such logic, which in practice may be ve...

    Implement property hooks as described?

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

    PDO driver specific sub-classes

    Author
    Danack
    Target
    8.4
    PDO is a generic database class. Some of the databases it supports have functionality that is specific to that database. For example, when connected to an SQLit...

    PDO driver specific subclasses

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