You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
929 B

  1. --TEST--
  2. Function overloading test 2
  3. --SKIPIF--
  4. <?php
  5. extension_loaded('mbstring') or die('skip mbstring not available');
  6. if (!function_exists("mail")) {
  7. die('skip mail() function is not available.');
  8. }
  9. if (!function_exists("mb_ereg_replace")) {
  10. die('skip mb_ereg_replace() function is not available.');
  11. }
  12. ?>
  13. --INI--
  14. output_handler=
  15. mbstring.func_overload=7
  16. mbstring.internal_encoding=EUC-JP
  17. --FILE--
  18. <?php
  19. echo mb_internal_encoding()."\n";
  20. $ngchars = array('ǽ','ɽ','��','��');
  21. $str = '��Ͻ�ܻ����Һ���ɽ��ǽ��ɽ��������˽��Ž�չ�ʸ����ͽ����Ƭ���ե���';
  22. $converted_str = mb_convert_encoding($str, 'Shift_JIS');
  23. mb_regex_encoding('Shift_JIS');
  24. foreach($ngchars as $c) {
  25. $c = mb_convert_encoding($c, 'Shift_JIS');
  26. $replaced = mb_convert_encoding(ereg_replace($c, '!!', $converted_str), mb_internal_encoding(), 'Shift_JIS');
  27. var_dump(strpos($replaced, '!!'));
  28. }
  29. ?>
  30. --EXPECT--
  31. EUC-JP
  32. int(10)
  33. int(8)
  34. int(3)
  35. int(29)