We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4aadd25 commit 0735432Copy full SHA for 0735432
src/UtfString.php
@@ -76,10 +76,7 @@ public function __construct($str)
76
$this->str = $str;
77
$this->byteIdx = 0;
78
$this->charIdx = 0;
79
- // TODO: `strlen($str)` might return a wrong length when function
80
- // overloading is enabled.
81
- // https://php.net/manual/ro/mbstring.overload.php
82
- $this->byteLen = strlen($str);
+ $this->byteLen = mb_strlen($str, '8bit');
83
$this->charLen = mb_strlen($str, 'UTF-8');
84
}
85
0 commit comments