v2, "yes", "no") t6=if(v1==v2, "yes", "no") t7=if(v1!=v2, "yes", "no") t8=if(v1 && v2, "yes", "no") t9=if(v1 || v2, "yes", "no") t10=if(isnum(v1), "yes", "no") t11=numeric(v1) t12=trunc(t4) t13=round(2.4) t14=roundup(2.4) t15=concat("ab","c") t16=cmp(v1>v2, "yes", "no") t17=length("abcd") t18=mb_length("あいう") t19=length("あいうabcd") t20=mb_length("あいうabcd") t21=han2zen("あいうabcd") t22=zen2han("あいうabcd") t23=zen2han("あいうabcd") t24=if (isasc("abc"), "yes", "no") t25=if (isasc("あabc"), "yes", "no") t26=if (isasc("あいう"), "yes", "no") t27=if (ismb("abc"), "yes", "no") t28=if (ismb("あabc"), "yes", "no") t29=if (ismb("あいう"), "yes", "no") t30=if (ismailaddress("abc"), "yes", "no") t31=if (ismailaddress("abc@example.jp"), "yes", "no") t32=cntup("test.cnt") t35="test1-> $t1" t36=time("%Y年%m月%d日 %H:%M:%S") t37=pasteto("paste.test") t38=includeto("paste.test") t39=reg_replace("bb", "xx", "aabbccbbaa") t40=reg_replace_all("bb", "xx", "aabbccbbaa") t41=reg_match("[0-9]+", "aa123bbccbb456aa") #t42=command_exec("/bin/date") #time のテストは省略 ?>

symreq正常系テストページ

正常に書かれたsymreq命令が正常に動作してるかを判断するページです。

シンボリック・スクリプト内部で利用できる命令が”処理内容”記述されています。

その関数を実行した値が”結果”に格納されます。この内容と”正しい結果”の内容が同じことを確認してください。同じときもしくは[説明]の説明通りのときは正常に動いていると言えます。

入力値は以下の2つです。
v1 = $v1
v2 = $v2

 

現在の環境は下記の通りです。
_SERVER=$_SERVER
_TEMPLATEDIR=$_TEMPLATEDIR
_DATADIR=$_DATADIR
_LOGDIR=$_LOGDIR
_CONFIGDIR=$_CONFIGDIR

 

print命令による表示
番号 処理内容 結果 正しい結果
1
v1 + v2 $t1 7
2
v1 - v2 $t2 3
3
v1 * v2 $t3 10
4
v1 / v2 $t4 2.5
5
if(v1>v2, "yes", "no") $t5 yes
6
if(v1==v2, "yes", "no") $t6 no
7
if(v1!=v2, "yes", "no") $t7 yes
8
if(v1 && v2, "yes", "no") $t8 yes
9
if(v1 || v2, "yes", "no") $t9 yes
10
if(isnum(v1), "yes", "no") $t10 yes
11
numeric(v1) $t11 5
12
trunc(2.5) $t12 2
13
round(2.4) $t13 2
14
roundup(2.4) $t14 3
15
concat("ab","c") $t15 abc
16
cmp (v1 > v2) $t16 yes
17
length("abcd") $t17 4
18
mb_length("あいう") $t18 3
19
length("あいうabcd") $t19 10
20
mb_length("あいうabcd") $t20 7
21
han2zen("あいうabcd") $t21 あいうabcd
22
zen2han("あいうabcd") $t22 あいうabcd
23
zen2han("あいうabcd") $t22 あいうabcd
24
if (isasc("abc"), "yes", "no") $t24 yes
25
if (isasc("あabc"), "yes", "no") $t25 no
26
if (isasc("あいう"), "yes", "no") $t26 no
27
if (ismb("abc"), "yes", "no") $t27 no
28
if (ismb("あabc"), "yes", "no") $t28 no
29
if (ismb("あいう"), "yes", "no") $t29 yes
30
if (ismailaddress("abc"), "yes", "no") $t30 no
31
if (ismailaddress("abc@example.jp"), "yes", "no") $t31 yes
32
cntup("test.cnt") $t32 [説明]現在のカウント
33
paste("paste.test"); [説明]paste.testの中身が変数展開されずに表示される
34
include("paste.test"); [説明]paste.testの中身が変数展開されて表示される
35
"test1-> $$t1" $t35 test1-> 7
36
time("%Y年%m月%d日 %H:%M:%S") $t36 [説明]現在の時刻が[2001年02月03日 01:02:03]というフォーマットで出力される
37
ret=pasteto("paste.test") $t37 [説明]ファイルの内容を一旦変数に入れて表示する。
38
ret=includeto("paste.test") $t38 [説明]ファイルの内容を一旦変数に入れて表示する。
39
ret=reg_replace("bb", "xx", "aabbccbbaa") $t39 aaxxccbbaa
40
ret=reg_replace_all("bb", "xx", "aabbccbbaa") $t40 aaxxccxxaa
41
ret=reg_match("[0-9]+", "aa123bbccbb456aa") $t41 123

これで終了です