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
rfc:mb_str_split [2019/01/05 21:09] rumirfc:mb_str_split [2019/02/12 16:53] (current) 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: Voting+  * Status: Implemented (in PHP 7.4)
   * First Published at: https://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 33: Line 54:
  
 ===== Proposed Voting Choices ===== ===== Proposed Voting Choices =====
-Include mb_str_split into next PHP-7.x 
 This project requires 50%+1 majority.  This project requires 50%+1 majority. 
-The voting period: from 2019-01-05 to 2019-01-15+The voting period: from 2019-01-10 to 2019-01-20
-<doodle title="mb_str_split" auth="rumi" voteType="single" closed="false">+<doodle title="Include mb_str_split into next PHP-7.x?" auth="user" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 43: Line 63:
 ===== Patches and Tests ===== ===== 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 ===== ===== Implementation =====
 +  - Was merged into master (PHP-7.4)
 +  - [[https://github.com/php/php-src/commit/d77ad27415a34e4f5908cb262567b7b6f0eca17f]]
 +
  
rfc/mb_str_split.1546722564.txt.gz · Last modified: 2019/01/05 21:09 by rumi