function _strrpos($str, $search, $offset = null) { if (is_null($offset)) { $old_enc = $this->_setUTF8IconvEncoding(); $result = iconv_strrpos($str, $search); $this->_setIconvEncoding($old_enc); return $result; } else { //mb_strrpos doesn't support offset! :( return parent::_strrpos($str, $search, (int) $offset); } }
function _strrpos($haystack, $needle, $offset = null) { if (is_null($offset)) { $old_enc = mb_internal_encoding(); mb_internal_encoding('utf-8'); $result = mb_strrpos($haystack, $needle); if ($old_enc) { mb_internal_encoding($old_enc); } return $result; } else { //mb_strrpos doesn't support offset! :( return parent::_strrpos($haystack, $needle, (int) $offset); } }