hebrevc_basic.phpt 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --TEST--
  2. Test hebrevc() function : basic functionality
  3. --FILE--
  4. <?php
  5. /* Prototype : string hebrevc ( string $hebrew_text [, int $max_chars_per_line ] )
  6. * Description: Convert logical Hebrew text to visual text
  7. * Source code: ext/standard/string.c
  8. */
  9. echo "*** Testing hebrevc() : basic functionality ***\n";
  10. $hebrew_text = "The hebrevc function converts logical Hebrew text to visual text.\nThis function is similar to hebrev() with the difference that it converts newlines (\n) to '<br>\n'.\nThe function tries to avoid breaking words.\n";
  11. var_dump(hebrevc($hebrew_text));
  12. var_dump(hebrevc($hebrew_text, 15));
  13. ?>
  14. ===DONE===
  15. --EXPECTF--
  16. *** Testing hebrevc() : basic functionality ***
  17. string(239) ".The hebrevc function converts logical Hebrew text to visual text<br />
  18. ) This function is similar to hebrev() with the difference that it converts newlines<br />
  19. <to '<br (<br />
  20. .'<br />
  21. .The function tries to avoid breaking words<br />
  22. "
  23. string(317) "to visual text<br />
  24. Hebrew text<br />
  25. logical<br />
  26. converts<br />
  27. function<br />
  28. .The hebrevc<br />
  29. newlines<br />
  30. it converts<br />
  31. difference that<br />
  32. with the<br />
  33. to hebrev()<br />
  34. is similar<br />
  35. ) This function<br />
  36. <to '<br (<br />
  37. .'<br />
  38. breaking words<br />
  39. tries to avoid<br />
  40. .The function<br />
  41. "
  42. ===DONE===