3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mb_str_split( $string ) { return preg_split('/(?<!^)(?!$)/u', $string ); } function mb_str_split2( $string ) { return $arr = preg_split('//u', $string, -1, PREG_SPLIT_NO_EMPTY); } function mbStringToArray ($string) { $strlen = mb_strlen($string); while ($strlen) { $array[] = mb_substr($string,0,1,"UTF-8"); $string = mb_substr($string,1,$strlen,"UTF-8"); $strlen = mb_strlen($string); } return $array; } $string = 'Příliš žluťoučký kůň úpěl ďábelské ódy'; var_dump( mb_str_split( $string ) ); var_dump( mb_str_split2( $string ) ); var_dump( mbStringToArray( $string ) );
Output for git.master, git.master_jit
Fatal error: Cannot redeclare mb_str_split() in /in/kL09q on line 3
Process exited with code 255.
Output for rfc.property-hooks
Fatal error: Cannot redeclare mb_str_split() in /in/kL09q on line 4
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
38.49 ms | 401 KiB | 8 Q