Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $str = str_repeat("foo",100000);
- $time = microtime(true);
- iconv_substr($str,1000,90000,'UTF-8');
- echo "iconv_substr: " . (microtime(true)-$time) . "\n";
- $time = microtime(true);
- mb_substr($str,1000,90000,'UTF-8');
- echo "mb_substr: " . (microtime(true)-$time) . "\n";
- $time = microtime(true);
- substr($str,1000,90000);
- echo "substr: " . (microtime(true)-$time) . "\n";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement