fromContent()
fromContent(string $content) : int
Returns the size in bytes of the given content.
This method calculates the byte size of a string. If the mbstring
extension is loaded, it uses mb_strlen with the '8bit' encoding
to ensure accurate byte measurement for multibyte characters.
Otherwise, it falls back to strlen.
Parameters
| string | $content | The content whose size is to be calculated. |
Returns
int —The size of the content in bytes.