示例#1
0
 /**
  * @param null $max_chars_per_line
  * @return $this
  * @desc 同上,同时把(\n) 转为 <br />。
  */
 public function hebrevc($max_chars_per_line = null)
 {
     $this->current = hebrevc($this->current, $max_chars_per_line);
     return $this;
 }
示例#2
0
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("\\"));
var_dump(money_format("%i", 1234.56));
var_dump(number_format(1234.56));
示例#3
0
             $cur_output = $value . "&nbsp;";
         }
     }
     break;
     //..............................................................................
 //..............................................................................
 case "comment":
     $cur_output = hebrevc($element_dt[$i]["ElementValue"]);
     break;
     //..............................................................................
 //..............................................................................
 case "textarea":
     if ($element_dt[$i]["access"] == "1" && $element_dt[$i]["active"] == "1") {
         $cur_output = "<textarea class='x-form-field' style='width:" . $element_dt[$i]["width"] . "' id='elem_" . $element_dt[$i]["ElementID"] . "' name='elem_" . $element_dt[$i]["ElementID"] . "' rows='5'>" . $element_dt[$i]["wfmElementValue"] . "</textarea>";
     } else {
         $cur_output = hebrevc($element_dt[$i]["wfmElementValue"]) . "&nbsp;";
     }
     break;
     //..............................................................................
 //..............................................................................
 case "combo":
     if ($element_dt[$i]["access"] == "1" && $element_dt[$i]["active"] == "1") {
         if ($element_dt[$i]["referenceInfoID"] == 0) {
             $cur_output = "<select class='x-form-field' id='elem_" . $element_dt[$i]["ElementID"] . "' \r\n\t\t\t\t\t\tname='elem_" . $element_dt[$i]["ElementID"] . "' style='width:" . $element_dt[$i]["width"] . "'>";
             $options = split(':', $element_dt[$i]["ElementValue"]);
             for ($j = 0; $j < count($options); $j++) {
                 $cur_output .= "<option value='" . $options[$j] . "' ";
                 $cur_output .= $element_dt[$i]["wfmElementValue"] == $options[$j] ? "selected" : "";
                 $cur_output .= ">" . $options[$j] . "</option>";
             }
             $cur_output .= "</select>";
示例#4
0
							<?php 
echo $content;
?>
							<br>
						</td>
					</tr>
					<tfoot>
					<tr style="height:400px;vertical-align: top">
						<td colspan="3" style="padding-right:30px;padding-left: 30px;">
							<br><hr><br><br>
							<div style="width:100%">
								<div style="float:right;" class="tripleFooter">
									<div style="float:right;width:20%;font-family: titr"> گیرنده : </div>
									<div style="float:left;width:80%;">
										<?php 
echo hebrevc($LetterObj->PostalAddress);
?>
</div>
								</div>
								<div style="float:left;" class="tripleFooter">
									<div style="float:right;width:20%;font-family: titr"> فرستنده : </div>
									<div style="float:left;width:80%;">
										<?php 
echo SoftwareName;
?>
<br>
										<?php 
echo OWNER_ADDRESS;
?>
<br>
									</div>
示例#5
0
 function xlsWriteLabel($Row, $Col, $Value)
 {
     $L = strlen($Value);
     echo pack("ssssss", 0x204, 8 + $L, $Row, $Col, 0x0, $L);
     //echo iconv('UTF-8','GB2312',$Value);
     echo hebrevc($Value);
     return;
 }
示例#6
0
<?php

/* Prototype  : string hebrevc  ( string $hebrew_text  [, int $max_chars_per_line  ] )
 * Description: Convert logical Hebrew text to visual text
 * Source code: ext/standard/string.c
*/
echo "*** Testing hebrevc() : error conditions ***\n";
echo "\n-- Testing hebrevc() function with no arguments --\n";
var_dump(hebrevc());
echo "\n-- Testing hebrevc() function with more than expected no. of arguments --\n";
$extra_arg = 10;
var_dump(hebrevc("Hello World", 5, $extra_arg));
?>
 
===DONE===
示例#7
0
 * Source code: ext/standard/string.c
*/
echo "*** Testing hebrevc() 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 hebrevc() function
$count = 1;
$hebrew_text = "The hebrevcc function converts logical Hebrew text to visual text.\nThis function is similar to hebrevc() with the difference that it converts newlines (\n) to '<br>\n'.\nThe function tries to avoid breaking words.\n";
foreach ($inputs as $max_chars_per_line) {
    echo "-- Iteration {$count} --\n";
    var_dump(hebrevc($hebrew_text, $max_chars_per_line));
    $count++;
}
fclose($file_handle);
//closing the file handle
?>
===DONE===
示例#8
0
<?php

/* Prototype  : string hebrevc  ( string $hebrew_text  [, int $max_chars_per_line  ] )
 * Description: Convert logical Hebrew text to visual text
 * Source code: ext/standard/string.c
*/
echo "*** Testing hebrevc() : basic functionality ***\n";
$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";
var_dump(hebrevc($hebrew_text));
var_dump(hebrevc($hebrew_text, 15));
?>
===DONE===
示例#9
0
 * Description: Convert logical Hebrew text to visual text
 * Source code: ext/standard/string.c
*/
echo "*** Testing hebrevc() 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);
// loop through with each element of the $texts array to test hebrevc() function
$count = 1;
foreach ($texts as $hebrew_text) {
    echo "-- Iteration {$count} --\n";
    var_dump(hebrevc($hebrew_text));
    $count++;
}
fclose($file_handle);
//closing the file handle
?>
===DONE===