PHP Classes

File: test/74_mb_str_split.php

Recommend this page to a friend!
  Classes of ASCOOS CMS   PHP Backwards Compatibility Library   test/74_mb_str_split.php   Download  
File: test/74_mb_str_split.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Backwards Compatibility Library
Functions of newer PHP versions for older versions
Author: By
Last change:
Date: 1 year ago
Size: 2,141 bytes
 

Contents

Class file image Download
<?php
/**
 * __ _ ___ ___ ___ ___ ___ ____ _ __ ___ ___
 * / _` |/ / / __/ _ \ / _ \ / / / __/| '_ ` _ \ / /
 * | (_| |\ \| (_| (_) | (_) |\ \ | (__ | | | | | |\ \
 * \__,_|/__/ \___\___/ \___/ /__/ \___\|_| |_| |_|/__/
 *
 *
 *************************************************************************************
 * @ASCOOS-NAME : ASCOOS CMS 24' *
 * @ASCOOS-VERSION : 24.0.0 *
 * @ASCOOS-CATEGORY : Kernel (Frontend and Administration Side) *
 * @ASCOOS-CREATOR : Drogidis Christos *
 * @ASCOOS-SITE : www.ascoos.com *
 * @ASCOOS-LICENSE : [Commercial] http://docs.ascoos.com/lics/ascoos/AGL-F.html *
 * @ASCOOS-COPYRIGHT : Copyright (c) 2007 - 2023, AlexSoft Software. *
 *************************************************************************************
 *
 * @package : ASCOOS CMS - phpBCL
 * @subpackage : Example mb_str_split Function
 * @source : /phpBCL/test/mb_str_split.php
 * @version : **** - $release: 1.0 - $revision: 1 - $build: ****
 * @created : 2023-07-07 07:00:00 UTC+3
 * @updated :
 * @author : Drogidis Christos
 * @authorSite : www.alexsoft.gr
 */

/**
 * ++ 7.4.0 ---- https://www.php.net/manual/en/function.mb-str-split.php
 */

 
define('ALEXSOFT_RUN_CMS', true);

 
$cms_path = str_replace('/phpBCL/test', '',str_replace('\\', '/', __DIR__));

 require_once(
$cms_path."/phpBCL/src/coreCompatibilities.php");


$str = "Hello Friend";

$arr1 = mb_str_split($str);
$arr2 = mb_str_split($str, 3);

print_r($arr1);
print_r($arr2);

/*
Array
(
    [0] => H
    [1] => e
    [2] => l
    [3] => l
    [4] => o
    [5] =>
    [6] => F
    [7] => r
    [8] => i
    [9] => e
    [10] => n
    [11] => d
)

Array
(
    [0] => Hel
    [1] => lo
    [2] => Fri
    [3] => end
)
*/

?>