diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-10-27 02:37:40 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-10-27 02:37:40 +0200 |
commit | 7d753464d13f3a3326a1679226127570cc0c498f (patch) | |
tree | 63a6b497957a275864e4227386b7157837545c97 /system/helpers/text_helper.php | |
parent | 485a348a7a633d38f69a963e9f77e23077f75d11 (diff) |
[ci skip] Optimize ascii_to_entities()
Diffstat (limited to 'system/helpers/text_helper.php')
-rw-r--r-- | system/helpers/text_helper.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index 016a36c57..89602fc28 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -118,18 +118,15 @@ if ( ! function_exists('ascii_to_entities')) /** * High ASCII to Entities * - * Converts High ascii text and MS Word special characters to character entities + * Converts high ASCII text and MS Word special characters to character entities * - * @param string + * @param string $str * @return string */ function ascii_to_entities($str) { - $count = 1; - $out = ''; - $temp = array(); - - for ($i = 0, $s = strlen($str); $i < $s; $i++) + $out = ''; + for ($i = 0, $s = strlen($str), $count = 1, $temp = array(); $i < $s; $i++) { $ordinal = ord($str[$i]); |