PageRenderTime 43ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/system/utf8/strrev.php

https://bitbucket.org/seyar/parshin.local
PHP | 18 lines | 8 code | 1 blank | 9 comment | 1 complexity | aef84cfcb6761daf921e08ee4ec3ef7a MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-2.1
  1. <?php defined('SYSPATH') or die('No direct script access.');
  2. /**
  3. * UTF8::strrev
  4. *
  5. * @package Kohana
  6. * @author Kohana Team
  7. * @copyright (c) 2007-2010 Kohana Team
  8. * @copyright (c) 2005 Harry Fuecks
  9. * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
  10. */
  11. function _strrev($str)
  12. {
  13. if (UTF8::is_ascii($str))
  14. return strrev($str);
  15. preg_match_all('/./us', $str, $matches);
  16. return implode('', array_reverse($matches[0]));
  17. }