<?phprequire_once('Timer.php');$target = 'qwertyuiop[]asdfghjkl;/'zxcvbnm,./qwertyuiop[]asdfghjkl;/'zxcvbnm,./qwertyuiop[]asdfghjkl;/'zxcvbnm,./qwertyuiop[]asdfghjkl;/'zxcvbnm,./qwertyuiop[]asdfghjkl;/'zxcvbnm,./qwertyuiop[]asdfghjkl;/'zxcvbnm,./qwertyuiop[]asdfghjkl;/'zxcvbnm,./qwertyuiop[]asdfghjkl;/'zxcvbnm,./qwertyuiop[]asdfghjkl;/'zxcvbnm,./qwertyuiop[]asdfghjkl;/'zxcvbnm,./';$count = isset($argv[1]) ? (int)$argv[1] : 1;$needle = 'vb';Timer::getInstance()->begin();for($i = 0; $i < $count; $i++) { strtr($target, $needle, '*');}echo "strtr exec {$count} times used time: " . Timer::getInstance()->end()->gone() . " sec./n";//----------------------------------------------------------------------------------------------Timer::getInstance()->begin();for($i = 0; $i < $count; $i++) { str_replace($needle, '*', $target);}echo "str_replace exec {$count} times used time: " . Timer::getInstance()->end()->gone() . " sec./n";