rfc:add_str_starts_with_and_ends_with_functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
rfc:add_str_starts_with_and_ends_with_functions [2020/04/05 16:47] – correction guilliamxavierrfc:add_str_starts_with_and_ends_with_functions [2020/05/05 11:47] – Closed Voting wkhudgins92
Line 1: Line 1:
 ====== PHP RFC: Add str_starts_with() and str_ends_with() functions ====== ====== PHP RFC: Add str_starts_with() and str_ends_with() functions ======
   * Version: 0.5   * Version: 0.5
-  * Date: 2020-03-25 (**Updated**: 2020-04-05)+  * Date: 2020-03-25 (**Updated**: 2020-05-05)
   * Author: Will Hudgins, will@wkhudgins.info   * Author: Will Hudgins, will@wkhudgins.info
-  * Status: Under Discussion+  * Status: Accepted
   * First Published at: https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions   * First Published at: https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions
  
Line 49: Line 49:
 strpos(strrev($haystack), strrev($needle)) === 0 strpos(strrev($haystack), strrev($needle)) === 0
 </PHP> </PHP>
-This is CPU inefficient because it requires reversing both the haystack and the needle as well as applying ''strpos'' (see above).+This is doubly inefficient because it requires reversing both the haystack and the needle as well as applying ''strpos'' (see above).
  
 <PHP> <PHP>
Line 105: Line 105:
   * **New Constants:** No new constants.   * **New Constants:** No new constants.
   * **php.ini Defaults:** No changed php.ini settings.   * **php.ini Defaults:** No changed php.ini settings.
 +
 +===== Votes =====
 +Voting closes 2020-05-04
 +
 +<doodle 
 +title="Add str_starts_with and str_ends_with as described" auth="wkhudgins92" voteType="single" closed="true">
 +   * yes
 +   * no
 +</doodle>
 +
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
Line 132: Line 142:
  
 ===== Rejected Features ===== ===== Rejected Features =====
-  * Case-insensitive and multibyte variants were included in the previous version of this RFC, which was declined. See also [[rfc:str_contains#case-insensitivity_and_multibyte_strings|the related section in the str_contains RFC]].+  * **Case-insensitive** and **multibyte** variants were included in the previous version of this RFC, which was declined. See also [[rfc:str_contains#case-insensitivity_and_multibyte_strings|the related section in the str_contains RFC]].
rfc/add_str_starts_with_and_ends_with_functions.txt · Last modified: 2020/05/05 14:12 by nikic