nikic

Nikita Popov

Contents

PHP RFC: Remove deprecated functionality in PHP 7

Introduction

This RFC proposes to remove functionality which has been deprecated during the 5.x cycle.

The following extensions are deprecated:

The following language features are deprecated:

  • Assignment of new by reference (since PHP 5.3; use normal assignment instead) REMOVED
  • Scoped calls of non-static methods from incompatible $this context (since PHP 5.6) REMOVED

The following functions are deprecated:

  • dl on fpm-fcgi (since PHP 5.3) REMOVED
  • set_magic_quotes_runtime and magic_quotes_runtime (since PHP 5.4) REMOVED
  • set_socket_blocking (since PHP 5.4; use stream_set_blocking instead) REMOVED
  • mcrypt_generic_end (since PHP 5.4; use mcrypt_generic_deinit instead) REMOVED
  • mcrypt_ecb, mcrypt_cbc, mcrypt_cfb and mcrypt_ofb (since PHP 5.5, but documented as deprecated earlier; use mcrypt_encrypt and mcrypt_decrypt instead) REMOVED
  • datefmt_set_timezone_id and IntlDateFormatter::setTimeZoneID (since PHP 5.5; use datefmt_set_timezone or IntlDateFormatter::setTimeZone instead) REMOVED

The following ini options are deprecated:

  • xsl.security_prefs (since PHP 5.4; use XsltProcessor::setSecurityPrefs instead) REMOVED
  • iconv.input_encoding, iconv.output_encoding, iconv.internal_encoding, mbstring.http_input, mbstring.http_output and mbstring.internal_encoding (since PHP 5.6; use php.input_encoding, php.internal_encoding and php.output_encoding instead) [TODO]

The following miscellaneous functionality is deprecated:

  • The $is_dst parameter of the mktime() and gmmktime() functions (since PHP 5.1) REMOVED
  • # style comments in ini files (since PHP 5.3; use ; style comments instead) REMOVED
  • String category names in setlocale() (since PHP 5.3; use LC_* constants instead) REMOVED
  • Unsafe curl file uploads (since PHP 5.5; use CurlFile instead) REMOVED
  • preg_replace() eval modifier (since PHP 5.5; use preg_replace_callback instead) REMOVED
  • PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT driver option (since PHP 5.6; use PDO::ATTR_EMULATE_PREPARES instead) REMOVED
  • CN_match and SNI_server_name stream context option (since PHP 5.6; use peer_name instead) REMOVED

Patches and Tests

Note: Patches are very outdated. I'll update them after the votes.

Votes

Voting started on 2015-01-02 and ended on 2015-01-16. All votes refer to PHP 7.

All removals have been accepted.

1)
reference-breaking notwithstanding

Votes

An option needs 50%+1 votes to win

Unbundle the ext/ereg extension? (92.5% approved)
User Vote
aharvey Yes
ajf Yes
brandon Yes
bwoebi Yes
dm Yes
dmitry No
dsp Yes
fa Yes
francois Yes
galvao Yes
guilhermeblanco Yes
gwynne Yes
irker Yes
jedibc Yes
jpauli Yes
kalle Yes
kinncj Yes
krakjoe Yes
kriscraig Yes
laruence Yes
leigh Yes
levim Yes
lstrojny Yes
mbeccati Yes
mike No
nikic Yes
peehaa Yes
philstu Yes
pollita Yes
rasmus Yes
rdohms Yes
remi No
salathe Yes
sebastian Yes
stas Yes
stelianm Yes
thekid Yes
till Yes
tyrael Yes
yunosh Yes
Unbundle the ext/mysql extension? (70% approved)
User Vote
ab No
aharvey Yes
ajf No
bwoebi Yes
dm Yes
dmitry No
dsp No
fredemmott No
galvao Yes
guilhermeblanco Yes
gwynne Yes
irker Yes
jedibc Yes
jpauli Yes
kalle Yes
kinncj Yes
krakjoe Yes
kriscraig Yes
laruence No
leigh Yes
levim Yes
lstrojny Yes
mbeccati No
mike Yes
nikic Yes
peehaa Yes
philstu Yes
pollita No
rasmus No
rdohms Yes
remi No
salathe No
sebastian Yes
stas Yes
stelianm Yes
thekid Yes
till Yes
tyrael Yes
yunosh Yes
zeev No
Remove assignment of new by reference? (83.8% approved)
User Vote
aharvey Yes
ajf Yes
bwoebi Yes
dm Yes
fa Yes
francois Yes
galvao Yes
guilhermeblanco Yes
gwynne Yes
irker Yes
jedibc Yes
jpauli Yes
kalle Yes
krakjoe Yes
kriscraig Yes
laruence No
leigh Yes
levim Yes
lstrojny Yes
mbeccati Yes
mike No
nikic Yes
peehaa Yes
philstu Yes
pollita No
rasmus No
rdohms Yes
salathe Yes
sebastian Yes
seld Yes
stas No
stelianm Yes
thekid Yes
till Yes
tyrael Yes
yunosh Yes
zeev No
Remove support for calls from incompatible context? (100% approved)
User Vote
aharvey Yes
ajf Yes
dmitry Yes
dsp Yes
fredemmott Yes
galvao Yes
guilhermeblanco Yes
gwynne Yes
irker Yes
jedibc Yes
jpauli Yes
kalle Yes
krakjoe Yes
kriscraig Yes
laruence Yes
leigh Yes
levim Yes
lstrojny Yes
mbeccati Yes
mike Yes
nikic Yes
peehaa Yes
philstu Yes
pollita Yes
rasmus Yes
rdohms Yes
salathe Yes
sebastian Yes
stas Yes
stelianm Yes
thekid Yes
till Yes
tyrael Yes
zeev Yes
Remove dl() in fpm-fcgi SAPI? (100% approved)
User Vote
aharvey Yes
ajf Yes
bwoebi Yes
dmitry Yes
dsp Yes
fa Yes
galvao Yes
guilhermeblanco Yes
gwynne Yes
irker Yes
jedibc Yes
jpauli Yes
kalle Yes
krakjoe Yes
kriscraig Yes
laruence Yes
leigh Yes
lstrojny Yes
mbeccati Yes
mike Yes
nikic Yes
peehaa Yes
pollita Yes
rasmus Yes
rdohms Yes
salathe Yes
sebastian Yes
stas Yes
stelianm Yes
till Yes
tyrael Yes
yunosh Yes
Remove (set_)magic_quotes_runtime() functions? (100% approved)
User Vote
aharvey Yes
ajf Yes
bwoebi Yes
dsp Yes
fa Yes
francois Yes
fredemmott Yes
galvao Yes
guilhermeblanco Yes
gwynne Yes
irker Yes
jedibc Yes
jpauli Yes
kalle Yes
krakjoe Yes
kriscraig Yes
laruence Yes
leigh Yes
levim Yes
lstrojny Yes
mbeccati Yes
mike Yes
nikic Yes
peehaa Yes
philstu Yes
pollita Yes
rasmus Yes
rdohms Yes
salathe Yes
sebastian Yes
stas Yes
stelianm Yes
thekid Yes
till Yes
tyrael Yes
yunosh Yes
Remove listed deprecated functions? (100% approved)
User Vote
aharvey Yes
ajf Yes
bwoebi Yes
dsp Yes
fa Yes
galvao Yes
guilhermeblanco Yes
gwynne Yes
irker Yes
jedibc Yes
jpauli Yes
kalle Yes
krakjoe Yes
kriscraig Yes
laruence Yes
leigh Yes
lstrojny Yes
mbeccati Yes
mike Yes
nikic Yes
peehaa Yes
philstu Yes
pollita Yes
rasmus Yes
rdohms Yes
salathe Yes
sobak Yes
stelianm Yes
till Yes
tyrael Yes
yunosh Yes
Remove xsl.security_prefs ini directive? (100% approved)
User Vote
aharvey Yes
ajf Yes
bwoebi Yes
fa Yes
galvao Yes
guilhermeblanco Yes
gwynne Yes
jedibc Yes
jpauli Yes
kalle Yes
krakjoe Yes
kriscraig Yes
leigh Yes
levim Yes
lstrojny Yes
mbeccati Yes
mike Yes
nikic Yes
peehaa Yes
philstu Yes
pollita Yes
rasmus Yes
salathe Yes
stas Yes
stelianm Yes
till Yes
tyrael Yes
yunosh Yes
Remove extension specific encoding ini directives? (100% approved)
User Vote
aharvey Yes
ajf Yes
bwoebi Yes
dmitry Yes
galvao Yes
guilhermeblanco Yes
gwynne Yes
jedibc Yes
jpauli Yes
kalle Yes
krakjoe Yes
kriscraig Yes
leigh Yes
lstrojny Yes
mbeccati Yes
mike Yes
peehaa Yes
philstu Yes
pollita Yes
rasmus Yes
salathe Yes
stas Yes
stelianm Yes
till Yes
tyrael Yes
yunosh Yes
Remove $is_dst parameter of the mktime() and gmmktime() functions? (100% approved)
User Vote
aharvey Yes
ajf Yes
galvao Yes
guilhermeblanco Yes
gwynne Yes
irker Yes
jedibc Yes
jpauli Yes
kalle Yes
krakjoe Yes
kriscraig Yes
leigh Yes
lstrojny Yes
mbeccati Yes
mike Yes
nikic Yes
peehaa Yes
philstu Yes
pollita Yes
rasmus Yes
salathe Yes
sebastian Yes
stas Yes
stelianm Yes
thekid Yes
till Yes
tyrael Yes
yunosh Yes
Remove support for #-style comments in ini files? (87.1% approved)
User Vote
aharvey Yes
ajf Yes
dmitry No
fa Yes
galvao Yes
guilhermeblanco Yes
gwynne Yes
irker Yes
jedibc Yes
jpauli Yes
kalle Yes
krakjoe Yes
kriscraig Yes
leigh Yes
levim No
lstrojny No
mbeccati Yes
mike No
nikic Yes
peehaa Yes
philstu Yes
pollita Yes
rasmus Yes
rdohms Yes
salathe Yes
sebastian Yes
stelianm Yes
thekid Yes
till Yes
tyrael Yes
yunosh Yes
Disallow string category names in setlocale()? (96.4% approved)
User Vote
aharvey Yes
ajf Yes
galvao Yes
guilhermeblanco Yes
gwynne Yes
irker Yes
jedibc Yes
jpauli Yes
kalle Yes
krakjoe Yes
kriscraig Yes
leigh Yes
lstrojny Yes
mbeccati Yes
mike Yes
nikic Yes
peehaa Yes
philstu Yes
pollita No
rasmus Yes
salathe Yes
sebastian Yes
sobak Yes
stas Yes
stelianm Yes
till Yes
tyrael Yes
yunosh Yes
Disallow enabling unsafe curl uploads? (76% approved)
User Vote
aharvey Yes
ajf Yes
fredemmott Yes
galvao Yes
guilhermeblanco Yes
gwynne No
jpauli Yes
kalle Yes
krakjoe Yes
kriscraig Yes
laruence No
leigh Yes
lstrojny Yes
mbeccati Yes
mike No
nikic Yes
peehaa Yes
philstu Yes
pollita No
rasmus Yes
salathe No
sebastian Yes
stas Yes
till No
tyrael Yes
Remove preg_replace() eval modifier? (97.1% approved)
User Vote
aharvey Yes
ajf Yes
bwoebi Yes
dmitry No
dsp Yes
fa Yes
galvao Yes
guilhermeblanco Yes
gwynne Yes
irker Yes
jedibc Yes
jpauli Yes
kalle Yes
krakjoe Yes
kriscraig Yes
leigh Yes
levim Yes
lstrojny Yes
mbeccati Yes
mike Yes
nikic Yes
peehaa Yes
philstu Yes
pollita Yes
rasmus Yes
salathe Yes
sebastian Yes
sobak Yes
stas Yes
stelianm Yes
thekid Yes
till Yes
tyrael Yes
yunosh Yes
Remove PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT driver option? (80% approved)
User Vote
aharvey Yes
ajf Yes
galvao Yes
guilhermeblanco Yes
gwynne Yes
jedibc Yes
jpauli Yes
kalle Yes
krakjoe Yes
kriscraig Yes
laruence No
leigh Yes
lstrojny Yes
mbeccati Yes
mike Yes
nikic Yes
peehaa Yes
philstu Yes
pollita No
rasmus No
salathe No
sebastian Yes
stas No
tyrael Yes
yunosh Yes
Remove CN_match and SNI_server_name stream context options? (80% approved)
User Vote
aharvey Yes
ajf Yes
bwoebi Yes
galvao Yes
guilhermeblanco Yes
gwynne Yes
jedibc Yes
jpauli Yes
kalle Yes
krakjoe Yes
kriscraig Yes
leigh Yes
lstrojny Yes
mbeccati Yes
mike No
nikic Yes
peehaa Yes
philstu Yes
pollita No
rasmus No
salathe Yes
sebastian Yes
stas No
till No
tyrael Yes