rfc:mb_str_split

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:mb_str_split [2019/01/02 12:55] rumirfc:mb_str_split [2019/02/12 16:44] rumi
Line 1: Line 1:
 ====== PHP RFC: mb_str_split ====== ====== PHP RFC: mb_str_split ======
-  * Version: 0.1 
   * Date: 2019-01-02   * Date: 2019-01-02
   * Author: rumi, legale.legale@gmail.com   * Author: rumi, legale.legale@gmail.com
-  * Status: Under Discussion  +  * Status: Implemented (in PHP 7.4) 
-  * First Published at: http://wiki.php.net/rfc/mb_str_split+  * First Published at: https://wiki.php.net/rfc/mb_str_split 
 +  * PR: [[https://github.com/php/php-src/pull/3715]], [[https://github.com/php/php-src/pull/3808]]
  
 ===== Introduction ===== ===== Introduction =====
-mb_str_split is a function to perform string splitting to an array of defined size chunks. Function works similar to str_split function but supports multibyte codepages just like other mbstring functions.+mb_str_split is a function to perform string splitting to an array of defined size chunks.  
 + 
 +==== Description ==== 
 +<php>array mb_str_split (string $string [, integer $split_length = 1, string $encoding = mb_internal_encoding() ])</php> 
 + 
 +The function works through the libmbfl library and supports all libmbfl supported charsets just like other mbstring functions.  
 + 
 +==== Usage example ==== 
 + 
 +<code php> 
 +<?php  
 +print_r(mb_str_split("победа", 2)); 
 + 
 +--EXPECT-- 
 + 
 +Array 
 +
 +    [0] => по 
 +    [1] => бе 
 +    [2] => да 
 +
 +</code>
  
 ===== Proposal ===== ===== Proposal =====
Line 18: Line 39:
  
 ==== To Existing Extensions ==== ==== To Existing Extensions ====
-Existent mbstring extension will be supplemented.+mbstring
  
 ==== To Opcache ==== ==== To Opcache ====
Line 33: Line 54:
  
 ===== Proposed Voting Choices ===== ===== Proposed Voting Choices =====
-Include mb_str_split into next PHP-7.x This project requires 50%+1 majority The voting started 2019-01-05 and will close on 2019-01-15+This project requires 50%+1 majority.  
 +The voting period: from 2019-01-10 to 2019-01-20. 
 +<doodle title="Include mb_str_split into next PHP-7.x?" auth="user" voteType="single" closed="true"> 
 +   * Yes 
 +   * No 
 +</doodle>
  
-===== Implementation =====+===== Patches and Tests =====
 https://github.com/php/php-src/pull/3715 https://github.com/php/php-src/pull/3715
 +https://github.com/php/php-src/pull/3808
 +
 +
 +===== Implementation =====
 +  - Was merged into master (7.4)
 +  - [[https://github.com/php/php-src/commit/d77ad27415a34e4f5908cb262567b7b6f0eca17f]]
 +
 +
rfc/mb_str_split.txt · Last modified: 2019/02/12 16:53 by rumi