当前位置: 首页>>代码示例>>PHP>>正文


PHP hebrev函数代码示例

本文整理汇总了PHP中hebrev函数的典型用法代码示例。如果您正苦于以下问题:PHP hebrev函数的具体用法?PHP hebrev怎么用?PHP hebrev使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了hebrev函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: readlineLeumi

 function readlineLeumi($line, $account)
 {
     //leumi wtf???
     //if(strlen($line)==56)
     //	return false;
     $refnum = ltrim(substr($line, 0, 7), '0');
     if ($refnum > 0) {
         $bank = new Bankbook();
         $bank->account_id = $account;
         $bank->refnum = $refnum;
         //ltrim(substr($line,22,7),' ');
         $bank->details = iconv("ISO-8859-8", "utf-8", hebrev(iconv("ibm862", "ISO-8859-8", substr($line, 16, 14))));
         $bank->date = "20" . substr($line, 12, 2) . "-" . substr($line, 10, 2) . "-" . substr($line, 8, 2);
         $sighn = substr($line, 32, 1) . '1';
         $value = ltrim(substr($line, 33, 12), '0 ') * $sighn;
         $bank->sum = $value;
         //$zachot-$hova;
         $sighn = substr($line, 46, 1) . '1';
         $bank->total = ltrim(substr($line, 47, 12), '0 ') * $sighn;
         if (!$bank->searchBankbook()) {
             //mybe save output? num
             $bank->extCorrelation = 0;
             return $bank->save();
         }
     }
 }
开发者ID:hkhateb,项目名称:linet3,代码行数:26,代码来源:Bankbook.php

示例2: heb_iso2uni

 public static function heb_iso2uni($isoline)
 {
     $isoline = hebrev($isoline);
     $o = '';
     $n = strlen($isoline);
     for ($i = 0; $i < $n; $i++) {
         $c = ord(substr($isoline, $i, 1));
         $o .= $c > 223 && $c < 251 ? '&#' . (1264 + $c) . ';' : chr($c);
     }
     return utf8_encode($o);
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:11,代码来源:jpgraph_ttf.inc.php

示例3: hebrev

    <p class=MsoNormal ><span lang=HE style='font-family:"Arial","sans-serif"'>&nbsp;</span></p>

    <p class=MsoNormal align=center  style='text-align:right'><b><span
                lang=HE style='font-family:"Arial","sans-serif"'>כתובת  </span></b><span
            lang=HE style='font-family:"Arial","sans-serif"'>                        </span><span
            lang=HE dir=RTL style='font-family:"Arial","sans-serif";direction: ltr;' ><?php 
echo hebrev($asset['street'] . ', ' . $asset['city']);
?>
</span></p>

    <p class=MsoNormal align=center  style='text-align:right'><b><span
                lang=HE style='font-family:"Arial","sans-serif"'>אזור תעסוקה</span></b><span
            lang=HE style='font-family:"Arial","sans-serif"'>                </span><span
            lang=HE dir=RTL  style="direction: ltr;"><?php 
echo hebrev($asset['employmentRegion']);
?>
</span></p>

    <p class=MsoNormal align=center  style='text-align:right'><b><span
                lang=HE style='font-family:"Arial","sans-serif"'>שנת הקמה</span></b><span
            lang=HE style='font-family:"Arial","sans-serif"'>                   </span><span
            dir=LTR><?php 
echo $asset['establishmentDate'];
?>
</span></p>

    <p class=MsoNormal align=center  style='text-align:right'><b><span
                lang=HE style='font-family:"Arial","sans-serif"'>בעלים   </span></b><span
            lang=HE style='font-family:"Arial","sans-serif"'>                        </span><span
            lang=HE dir="ltr" style="direction: ltr;"><? foreach($investors as $investor) {
开发者ID:AnyApp,项目名称:-Commercial-System,代码行数:30,代码来源:generateBuildingDoc.php

示例4: var_dump

var_dump(htmlentities(" ", ENT_COMPAT, ""));
var_dump(htmlentities(" ", ENT_COMPAT, "UTF-8"));
var_dump(quoted_printable_encode("egfe \r\t"));
var_dump(quoted_printable_decode("=65=67=66=65="));
var_dump(convert_uudecode("+22!L;W9E(%!(4\"\$`\n`"));
var_dump(convert_uuencode("test\ntext text\r\n"));
var_dump(str_rot13("PHP 4.3.0"));
var_dump(crc32("The quick brown fox jumped over the lazy dog."));
var_dump(strlen(crypt("mypassword")));
var_dump(md5("apple"));
var_dump(sha1("apple"));
$trans = array("hello" => "hi", "hi" => "hello");
var_dump(strtr("hi all, I said hello", $trans));
var_dump(convert_cyr_string("abc", "a", "d"));
// sanity
var_dump(hebrev("test"));
// sanity
var_dump(hebrevc("test"));
// sanity
var_dump(nl_langinfo(AM_STR));
var_dump(sprintf("A%sB%dC", "test", 10));
var_dump(sprintf("%010s", "1101"));
var_dump(sprintf("%02d", "09"));
var_dump(sprintf("(%s-%s)", "foobar", "barfoo"));
var_dump(sprintf("[%s]", "ab"));
var_dump(vsprintf("A%sB%dC", array("test", 10)));
var_dump(sscanf("SN/2350001", "SN/%d"));
var_dump(sscanf("SN/2350001", "SN/%d", $out));
var_dump($out);
var_dump(chr(92));
var_dump(ord("\\"));
开发者ID:sskblr,项目名称:hhvm,代码行数:31,代码来源:ext_string.php

示例5: hebrev

 * Description: Convert logical Hebrew text to visual text
 * Source code: ext/standard/string.c
*/
echo "*** Testing hebrev() function: with unexpected inputs for 'hebrew_text' argument ***\n";
//get an unset variable
$unset_var = 'string_val';
unset($unset_var);
//defining a class
class sample
{
    public function __toString()
    {
        return "sample object";
    }
}
//getting the resource
$file_handle = fopen(__FILE__, "r");
// array with different values for $hebrew_text
$texts = array(0, 1, 255, 256, 2147483647, -2147483648, 10.5, -20.5, 1012345.67, array(), array(0), array(1, 2), true, false, TRUE, FALSE, NULL, null, new sample(), $file_handle, @$undefined_var, @$unset_var, 'text with parentheses (', 'text with parentheses )', 'text with bracket [', 'text with bracket ]', 'text with curly bracket {', 'text with curly bracket }', 'text with backslash escape \\', 'text with a slash char /', 'text with a greater than char >', 'text with a less than char <');
// loop through with each element of the $texts array to test hebrev() function
$count = 1;
foreach ($texts as $hebrew_text) {
    echo "-- Iteration {$count} --\n";
    var_dump(hebrev($hebrew_text));
    $count++;
}
fclose($file_handle);
//closing the file handle
?>
===DONE===
开发者ID:zaky-92,项目名称:php-1,代码行数:30,代码来源:ext_standard_tests_strings_hebrev_variation1.php

示例6: utf8_recode

/**
* Recode a string to UTF-8
*
* If the encoding is not supported, the string is returned as-is
*
* @param	string	$string		Original string
* @param	string	$encoding	Original encoding (lowered)
* @return	string				The string, encoded in UTF-8
*/
function utf8_recode($string, $encoding)
{
	$encoding = strtolower($encoding);

	if ($encoding == 'utf-8' || !is_string($string) || empty($string))
	{
		return $string;
	}

	// we force iso-8859-1 to be cp1252
	if ($encoding == 'iso-8859-1')
	{
		$encoding = 'cp1252';
	}
	// convert iso-8859-8-i to iso-8859-8
	else if ($encoding == 'iso-8859-8-i')
	{
		$encoding = 'iso-8859-8';
		$string = hebrev($string);
	}

	// First, try iconv()
	if (function_exists('iconv'))
	{
		$ret = @iconv($encoding, 'utf-8', $string);

		if (!empty($ret))
		{
			return $ret;
		}
	}

	// Try the mb_string extension
	if (function_exists('mb_convert_encoding'))
	{
		// mbstring is nasty on PHP4, we must make *sure* that we send a good encoding
		switch ($encoding)
		{
			case 'iso-8859-1':
			case 'iso-8859-2':
			case 'iso-8859-4':
			case 'iso-8859-7':
			case 'iso-8859-9':
			case 'iso-8859-15':
			case 'windows-1251':
			case 'windows-1252':
			case 'cp1252':
			case 'shift_jis':
			case 'euc-kr':
			case 'big5':
			case 'gb2312':
				$ret = @mb_convert_encoding($string, 'utf-8', $encoding);

				if (!empty($ret))
				{
					return $ret;
				}
		}
	}

	// Try the recode extension
	if (function_exists('recode_string'))
	{
		$ret = @recode_string($encoding . '..utf-8', $string);

		if (!empty($ret))
		{
			return $ret;
		}
	}

	// If nothing works, check if we have a custom transcoder available
	if (!preg_match('#^[a-z0-9_ \\-]+$#', $encoding))
	{
		// Make sure the encoding name is alphanumeric, we don't want it to be abused into loading arbitrary files
		trigger_error('Unknown encoding: ' . $encoding, E_USER_ERROR);
	}

	// iso-8859-* character encoding
	if (preg_match('/iso[_ -]?8859[_ -]?(\\d+)/', $encoding, $array))
	{
		switch ($array[1])
		{
			case '1':
			case '2':
			case '4':
			case '7':
			case '8':
			case '9':
			case '15':
				if (!function_exists('iso_8859_' . $array[1]))
//.........这里部分代码省略.........
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:101,代码来源:utf_tools.php

示例7: hebrev

<?php

/* Prototype  : string hebrev  ( string $hebrew_text  [, int $max_chars_per_line  ] )
 * Description: Convert logical Hebrew text to visual text
 * Source code: ext/standard/string.c
*/
echo "*** Testing hebrev() : basic functionality ***\n";
$hebrew_text = "The hebrev function converts logical Hebrew text to visual text.\nThe function tries to avoid breaking words.\n";
var_dump(hebrev($hebrew_text));
var_dump(hebrev($hebrew_text, 15));
?>
===DONE===
开发者ID:badlamer,项目名称:hhvm,代码行数:12,代码来源:hebrev_basic.php

示例8: hebrev

<HTML>
<HEAD>
<TITLE>hebrev</TITLE>
</HEAD>
<BODY>
<?php 
print hebrev("Hebrew");
?>
</BODY>
</HTML>
开发者ID:kapsilon,项目名称:Specialist,代码行数:10,代码来源:hebrev.php

示例9: hebrev

 /**
  * @param null $max_chars_per_line
  * @return $this
  * @desc 把希伯来文本从右至左的流转换为左至右的流。
  */
 public function hebrev($max_chars_per_line = null)
 {
     $this->current = hebrev($this->current, $max_chars_per_line);
     return $this;
 }
开发者ID:keehao,项目名称:Php-Object-Framework,代码行数:10,代码来源:HTString.php

示例10: hebrev

 * Source code: ext/standard/string.c
*/
echo "*** Testing hebrev() function: with unexpected inputs for 'max_chars_per_line' argument ***\n";
//get an unset variable
$unset_var = 'string_val';
unset($unset_var);
//defining a class
class sample
{
    public function __toString()
    {
        return "sample object";
    }
}
//getting the resource
$file_handle = fopen(__FILE__, "r");
// array with different values for $max_chars_per_line
$inputs = array(0, 1, 255, 256, 2147483647, -2147483648, 10.5, -20.5, 1012345.67, array(), array(0), array(1, 2), true, false, TRUE, FALSE, NULL, null, "abc", 'abc', "3abc", "0abc", "0x3", new sample(), $file_handle, @$undefined_var, @$unset_var);
// loop through with each element of the $texts array to test hebrev() function
$count = 1;
$hebrew_text = "The hebrev function converts logical Hebrew text to visual text.\nThe function tries to avoid breaking words.\n";
foreach ($inputs as $max_chars_per_line) {
    echo "-- Iteration {$count} --\n";
    var_dump(hebrev($hebrew_text, $max_chars_per_line));
    $count++;
}
fclose($file_handle);
//closing the file handle
?>
===DONE===
开发者ID:badlamer,项目名称:hhvm,代码行数:30,代码来源:hebrev_variation2.php

示例11: hebrev

<?php

/* Prototype  : string hebrev  ( string $hebrew_text  [, int $max_chars_per_line  ] )
 * Description: Convert logical Hebrew text to visual text
 * Source code: ext/standard/string.c
*/
echo "*** Testing hebrev() : error conditions ***\n";
echo "\n-- Testing hebrev() function with no arguments --\n";
var_dump(hebrev());
echo "\n-- Testing hebrev() function with more than expected no. of arguments --\n";
$extra_arg = 10;
var_dump(hebrev("Hello World", 5, $extra_arg));
?>
 
===DONE===
开发者ID:badlamer,项目名称:hhvm,代码行数:15,代码来源:hebrev_error.php

示例12: drawText

 /**
  * Draws text on the curren page.
  * 
  * @param int $x X coordinate
  * @param int $y Y coordinate
  * @param int $font_size Font size
  * @param string $text The text to be drawn
  * @param int $alignment PdfDocument::AL_LEFT, PdfDocument::AL_CENTER or PdfDocument::AL_RIGHT
  * @return int Returns the height of the drawn text (to easily change the $y coordinate for the next call)
  */
 public function drawText($x, $y, $font_size, $text, $alignment = self::AL_LEFT)
 {
     if (!$this->currentPage) {
         $this->currentPage = $this->createNewPage();
     }
     $charEncoding = 'UTF-8';
     $this->currentPage->setFont($this->Font, $font_size);
     $text = trim($text);
     $text = str_ireplace("\r\n", "\n", $text);
     $text = str_ireplace("<br/>", "\n", $text);
     $text = str_ireplace("<br>", "\n", $text);
     $text = str_ireplace("<br />", "\n", $text);
     $text = wordwrap($text, 110, "\n", false);
     switch ($alignment) {
         case self::AL_CENTER:
             $x = $x - $this->textWidth($text, $font_size) / 2;
             break;
         case self::AL_RIGHT:
             $x = $x - $this->textWidth($text, $font_size);
             break;
     }
     // spacial handling for multi-line texts
     if (strpos($text, "\n") !== false) {
         $rows = explode("\n", $text);
         foreach ($rows as $row) {
             $row = str_replace("\r", "", $row);
             $this->currentPage->drawText($row, $x, $y, $charEncoding);
             $y -= 12;
         }
         return $this->LineHeight * count($rows);
     }
     /**
      * Handle Arabic text (mantis #6712)
      */
     if (0 < preg_match('/\\p{Arabic}/u', $text)) {
         system_load_module(__DIR__ . "/../../arabic.php");
         $arglyphs = new I18N_Arabic('Glyphs');
         $text = $arglyphs->utf8Glyphs($text);
     } else {
         if (0 < preg_match('/\\p{Hebrew}/u', $text)) {
             $text = iconv("ISO-8859-8", "UTF-8", hebrev(iconv("UTF-8", "ISO-8859-8//IGNORE", $text)));
         }
     }
     $this->currentPage->drawText($text, $x, $y, $charEncoding);
     return $this->LineHeight;
 }
开发者ID:Naveenr9,项目名称:WebFramework,代码行数:56,代码来源:pdfdocument.class.php

示例13: he

function he($data)
{
    return urlencode(strrev(hebrev(iconv("UTF-8", "ISO-8859-8", $data))));
}
开发者ID:hftf,项目名称:hebconj,代码行数:4,代码来源:hebconj-functions.php


注:本文中的hebrev函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。