note 83977 deleted from function.str-split by crell
| From: | crell@php.net | Date: | Wed, 29 Jun 2022 18:29:44 +0000 |
| Subject: | note 83977 deleted from function.str-split by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218683@lists.php.net to get a copy of this message | ||
Note Submitter: vec [ at t] g dot com
----
the fastast way (that fits my needs) to replace str_split() in php 4 i found is this:
<?php
if(!function_exists('str_split')) {
function str_split($string, $split_length = 1) {
$array = explode("\r\n", chunk_split($string, $split_length));
array_pop($array);
return $array;
}
}
?>
i also tested the provided functions in the comments..
(the differences are 0.001 to 0.00001 sec)