コラム

filter_input – PHPテストデータ一覧 – テストデータを入れてみました

  • 2016.10.28

PHPのfilter_inputのテストデータを入れて検証を行いました。検証フィルタ、除去フィルタ、フィルタフラグのテストを行いました。
バリデーションを行う際の参考にしてください。

表の見方は、左から、「フィルター」「テストする値」「フィルターの結果」になります。
「フィルタフラグ」がある場合は、フィルターの後にカンマで続けて記載しております。

検証フィルタ

“1”、”true”、”on” および “yes” の場合に TRUE、 それ以外の場合に FALSE を返します。FILTER_NULL_ON_FAILURE が設定されている場合は、 FALSE が返されるのは “0”、”false”、”off”、”no” および “” の場合のみとなります。 boolean 以外の値については NULL を返します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_VALIDATE_BOOLEAN NULL bool(false)
FILTER_VALIDATE_BOOLEAN (空) bool(false)
FILTER_VALIDATE_BOOLEAN 0 bool(false)
FILTER_VALIDATE_BOOLEAN 1 bool(true)
FILTER_VALIDATE_BOOLEAN -1 bool(false)
FILTER_VALIDATE_BOOLEAN 0.1 bool(false)
FILTER_VALIDATE_BOOLEAN -0.1 bool(false)
FILTER_VALIDATE_BOOLEAN 10000 bool(false)
FILTER_VALIDATE_BOOLEAN “10,000” bool(false)
FILTER_VALIDATE_BOOLEAN 01 bool(true)
FILTER_VALIDATE_BOOLEAN 0xabc bool(false)
FILTER_VALIDATE_BOOLEAN “0xghi” bool(false)
FILTER_VALIDATE_BOOLEAN true bool(true)
FILTER_VALIDATE_BOOLEAN false bool(false)
FILTER_VALIDATE_BOOLEAN yes bool(true)
FILTER_VALIDATE_BOOLEAN no bool(false)
FILTER_VALIDATE_BOOLEAN on bool(true)
FILTER_VALIDATE_BOOLEAN off bool(false)
FILTER_VALIDATE_BOOLEAN ABC bool(false)
FILTER_VALIDATE_BOOLEAN abc bool(false)
FILTER_VALIDATE_BOOLEAN あいう bool(false)
FILTER_VALIDATE_BOOLEAN 漢字 bool(false)
FILTER_VALIDATE_BOOLEAN <div>test</div> bool(false)
FILTER_VALIDATE_BOOLEAN ! bool(false)
FILTER_VALIDATE_BOOLEAN # bool(false)
FILTER_VALIDATE_BOOLEAN $ bool(false)
FILTER_VALIDATE_BOOLEAN % bool(false)
FILTER_VALIDATE_BOOLEAN & bool(false)
FILTER_VALIDATE_BOOLEAN bool(false)
FILTER_VALIDATE_BOOLEAN * bool(false)
FILTER_VALIDATE_BOOLEAN + bool(false)
FILTER_VALIDATE_BOOLEAN bool(false)
FILTER_VALIDATE_BOOLEAN = bool(false)
FILTER_VALIDATE_BOOLEAN ? bool(false)
FILTER_VALIDATE_BOOLEAN ^ bool(false)
FILTER_VALIDATE_BOOLEAN _ bool(false)
FILTER_VALIDATE_BOOLEAN ` bool(false)
FILTER_VALIDATE_BOOLEAN { bool(false)
FILTER_VALIDATE_BOOLEAN | bool(false)
FILTER_VALIDATE_BOOLEAN } bool(false)
FILTER_VALIDATE_BOOLEAN ~ bool(false)
FILTER_VALIDATE_BOOLEAN @ bool(false)
FILTER_VALIDATE_BOOLEAN . bool(false)
FILTER_VALIDATE_BOOLEAN [ bool(false)
FILTER_VALIDATE_BOOLEAN ] bool(false)
FILTER_VALIDATE_BOOLEAN ( ※半角 bool(false)
FILTER_VALIDATE_BOOLEAN ) ※半角 bool(false)
FILTER_VALIDATE_BOOLEAN ( ※全角 bool(false)
FILTER_VALIDATE_BOOLEAN ) ※全角 bool(false)
FILTER_VALIDATE_BOOLEAN bool(false)
FILTER_VALIDATE_BOOLEAN \ bool(false)
FILTER_VALIDATE_BOOLEAN ; bool(false)
FILTER_VALIDATE_BOOLEAN : bool(false)
FILTER_VALIDATE_BOOLEAN , bool(false)
FILTER_VALIDATE_BOOLEAN / bool(false)
FILTER_VALIDATE_BOOLEAN < bool(false)
FILTER_VALIDATE_BOOLEAN > bool(false)
FILTER_VALIDATE_BOOLEAN sample@example.jp bool(false)
FILTER_VALIDATE_BOOLEAN .sample@example.jp bool(false)
FILTER_VALIDATE_BOOLEAN sample.@example.jp bool(false)
FILTER_VALIDATE_BOOLEAN sam..ple@example.jp bool(false)
FILTER_VALIDATE_BOOLEAN test.sample@example.jp bool(false)
FILTER_VALIDATE_BOOLEAN myaddress+test2@gmail.com bool(false)
FILTER_VALIDATE_BOOLEAN 10.0.0.0/8 bool(false)
FILTER_VALIDATE_BOOLEAN 172.16.0.0/12 bool(false)
FILTER_VALIDATE_BOOLEAN 192.168.0.0/16 bool(false)
FILTER_VALIDATE_BOOLEAN 0.0.0.0/8 bool(false)
FILTER_VALIDATE_BOOLEAN 169.254.0.0/16 bool(false)
FILTER_VALIDATE_BOOLEAN 127.0.0.0/8 bool(false)
FILTER_VALIDATE_BOOLEAN 240.0.0.0/4 bool(false)
FILTER_VALIDATE_BOOLEAN 10.0.0.0 bool(false)
FILTER_VALIDATE_BOOLEAN 172.16.0.0 bool(false)
FILTER_VALIDATE_BOOLEAN 192.168.0.0 bool(false)
FILTER_VALIDATE_BOOLEAN 192.168.0.0:80 bool(false)
FILTER_VALIDATE_BOOLEAN 0.0.0.0 bool(false)
FILTER_VALIDATE_BOOLEAN 169.254.0.0 bool(false)
FILTER_VALIDATE_BOOLEAN 127.0.0.0 bool(false)
FILTER_VALIDATE_BOOLEAN 240.0.0.0 bool(false)
FILTER_VALIDATE_BOOLEAN :80 bool(false)
FILTER_VALIDATE_BOOLEAN localhost bool(false)
FILTER_VALIDATE_BOOLEAN ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_BOOLEAN FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_BOOLEAN FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_BOOLEAN FG:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_BOOLEAN 2001:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_BOOLEAN 12:34:56:78:9a:bc bool(false)
FILTER_VALIDATE_BOOLEAN http://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_BOOLEAN https://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_BOOLEAN ssh://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_BOOLEAN mailto:sample@example.jp bool(false)

“1”、”true”、”on” および “yes” の場合に TRUE、 それ以外の場合に FALSE を返します。FILTER_NULL_ON_FAILURE が設定されている場合は、 FALSE が返されるのは “0”、”false”、”off”、”no” および “” の場合のみとなります。 boolean 以外の値については NULL を返します。
フィルタフラグ: boolean 値として認識できない値の場合に NULL を返します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE NULL bool(false)
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE (空) bool(false)
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 0 bool(false)
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 1 bool(true)
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE -1 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 0.1 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE -0.1 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 10000 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE “10,000” NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 01 bool(true)
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 0xabc NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE “0xghi” NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE true bool(true)
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE false bool(false)
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE yes bool(true)
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE no bool(false)
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE on bool(true)
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE off bool(false)
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ABC NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE abc NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE あいう NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 漢字 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE <div>test</div> NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ! NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE # NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE $ NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE % NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE & NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE * NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE + NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE = NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ? NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ^ NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE _ NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ` NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE { NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE | NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE } NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ~ NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE @ NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE . NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE [ NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ] NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ( ※半角 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ) ※半角 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ( ※全角 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ) ※全角 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE \ NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ; NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE : NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE , NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE / NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE < NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE > NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE sample@example.jp NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE .sample@example.jp NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE sample.@example.jp NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE sam..ple@example.jp NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE test.sample@example.jp NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE myaddress+test2@gmail.com NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 10.0.0.0/8 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 172.16.0.0/12 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 192.168.0.0/16 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 0.0.0.0/8 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 169.254.0.0/16 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 127.0.0.0/8 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 240.0.0.0/4 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 10.0.0.0 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 172.16.0.0 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 192.168.0.0 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 192.168.0.0:80 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 0.0.0.0 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 169.254.0.0 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 127.0.0.0 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 240.0.0.0 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE :80 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE localhost NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE FG:DB8:0:0:8:800:200C:417A NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 2001:DB8:0:0:8:800:200C:417A NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE 12:34:56:78:9a:bc NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE http://www.yahoo.co.jp NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE https://www.yahoo.co.jp NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ssh://www.yahoo.co.jp NULL
FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE mailto:sample@example.jp NULL

e-mail アドレスが RFC 822 に沿った形式であるかどうかを確かめます。 ただし、コメントおよび空白の折り返し (whitespace folding) には対応していません。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_VALIDATE_EMAIL NULL bool(false)
FILTER_VALIDATE_EMAIL (空) bool(false)
FILTER_VALIDATE_EMAIL 0 bool(false)
FILTER_VALIDATE_EMAIL 1 bool(false)
FILTER_VALIDATE_EMAIL -1 bool(false)
FILTER_VALIDATE_EMAIL 0.1 bool(false)
FILTER_VALIDATE_EMAIL -0.1 bool(false)
FILTER_VALIDATE_EMAIL 10000 bool(false)
FILTER_VALIDATE_EMAIL “10,000” bool(false)
FILTER_VALIDATE_EMAIL 01 bool(false)
FILTER_VALIDATE_EMAIL 0xabc bool(false)
FILTER_VALIDATE_EMAIL “0xghi” bool(false)
FILTER_VALIDATE_EMAIL true bool(false)
FILTER_VALIDATE_EMAIL false bool(false)
FILTER_VALIDATE_EMAIL yes bool(false)
FILTER_VALIDATE_EMAIL no bool(false)
FILTER_VALIDATE_EMAIL on bool(false)
FILTER_VALIDATE_EMAIL off bool(false)
FILTER_VALIDATE_EMAIL ABC bool(false)
FILTER_VALIDATE_EMAIL abc bool(false)
FILTER_VALIDATE_EMAIL あいう bool(false)
FILTER_VALIDATE_EMAIL 漢字 bool(false)
FILTER_VALIDATE_EMAIL <div>test</div> bool(false)
FILTER_VALIDATE_EMAIL ! bool(false)
FILTER_VALIDATE_EMAIL # bool(false)
FILTER_VALIDATE_EMAIL $ bool(false)
FILTER_VALIDATE_EMAIL % bool(false)
FILTER_VALIDATE_EMAIL & bool(false)
FILTER_VALIDATE_EMAIL bool(false)
FILTER_VALIDATE_EMAIL * bool(false)
FILTER_VALIDATE_EMAIL + bool(false)
FILTER_VALIDATE_EMAIL bool(false)
FILTER_VALIDATE_EMAIL = bool(false)
FILTER_VALIDATE_EMAIL ? bool(false)
FILTER_VALIDATE_EMAIL ^ bool(false)
FILTER_VALIDATE_EMAIL _ bool(false)
FILTER_VALIDATE_EMAIL ` bool(false)
FILTER_VALIDATE_EMAIL { bool(false)
FILTER_VALIDATE_EMAIL | bool(false)
FILTER_VALIDATE_EMAIL } bool(false)
FILTER_VALIDATE_EMAIL ~ bool(false)
FILTER_VALIDATE_EMAIL @ bool(false)
FILTER_VALIDATE_EMAIL . bool(false)
FILTER_VALIDATE_EMAIL [ bool(false)
FILTER_VALIDATE_EMAIL ] bool(false)
FILTER_VALIDATE_EMAIL ( ※半角 bool(false)
FILTER_VALIDATE_EMAIL ) ※半角 bool(false)
FILTER_VALIDATE_EMAIL ( ※全角 bool(false)
FILTER_VALIDATE_EMAIL ) ※全角 bool(false)
FILTER_VALIDATE_EMAIL bool(false)
FILTER_VALIDATE_EMAIL \ bool(false)
FILTER_VALIDATE_EMAIL ; bool(false)
FILTER_VALIDATE_EMAIL : bool(false)
FILTER_VALIDATE_EMAIL , bool(false)
FILTER_VALIDATE_EMAIL / bool(false)
FILTER_VALIDATE_EMAIL < bool(false)
FILTER_VALIDATE_EMAIL > bool(false)
FILTER_VALIDATE_EMAIL sample@example.jp string(17) “sample@example.jp”
FILTER_VALIDATE_EMAIL .sample@example.jp bool(false)
FILTER_VALIDATE_EMAIL sample.@example.jp bool(false)
FILTER_VALIDATE_EMAIL sam..ple@example.jp bool(false)
FILTER_VALIDATE_EMAIL test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_VALIDATE_EMAIL myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_VALIDATE_EMAIL 10.0.0.0/8 bool(false)
FILTER_VALIDATE_EMAIL 172.16.0.0/12 bool(false)
FILTER_VALIDATE_EMAIL 192.168.0.0/16 bool(false)
FILTER_VALIDATE_EMAIL 0.0.0.0/8 bool(false)
FILTER_VALIDATE_EMAIL 169.254.0.0/16 bool(false)
FILTER_VALIDATE_EMAIL 127.0.0.0/8 bool(false)
FILTER_VALIDATE_EMAIL 240.0.0.0/4 bool(false)
FILTER_VALIDATE_EMAIL 10.0.0.0 bool(false)
FILTER_VALIDATE_EMAIL 172.16.0.0 bool(false)
FILTER_VALIDATE_EMAIL 192.168.0.0 bool(false)
FILTER_VALIDATE_EMAIL 192.168.0.0:80 bool(false)
FILTER_VALIDATE_EMAIL 0.0.0.0 bool(false)
FILTER_VALIDATE_EMAIL 169.254.0.0 bool(false)
FILTER_VALIDATE_EMAIL 127.0.0.0 bool(false)
FILTER_VALIDATE_EMAIL 240.0.0.0 bool(false)
FILTER_VALIDATE_EMAIL :80 bool(false)
FILTER_VALIDATE_EMAIL localhost bool(false)
FILTER_VALIDATE_EMAIL ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_EMAIL FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_EMAIL FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_EMAIL FG:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_EMAIL 2001:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_EMAIL 12:34:56:78:9a:bc bool(false)
FILTER_VALIDATE_EMAIL http://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_EMAIL https://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_EMAIL ssh://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_EMAIL mailto:sample@example.jp bool(false)

値が float であるかどうかを検証し、成功した場合は値を float に変換します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_VALIDATE_FLOAT NULL bool(false)
FILTER_VALIDATE_FLOAT (空) bool(false)
FILTER_VALIDATE_FLOAT 0 float(0)
FILTER_VALIDATE_FLOAT 1 float(1)
FILTER_VALIDATE_FLOAT -1 float(-1)
FILTER_VALIDATE_FLOAT 0.1 float(0.1)
FILTER_VALIDATE_FLOAT -0.1 float(-0.1)
FILTER_VALIDATE_FLOAT 10000 float(10000)
FILTER_VALIDATE_FLOAT “10,000” bool(false)
FILTER_VALIDATE_FLOAT 01 float(1)
FILTER_VALIDATE_FLOAT 0xabc float(2748)
FILTER_VALIDATE_FLOAT “0xghi” bool(false)
FILTER_VALIDATE_FLOAT true float(1)
FILTER_VALIDATE_FLOAT false bool(false)
FILTER_VALIDATE_FLOAT yes bool(false)
FILTER_VALIDATE_FLOAT no bool(false)
FILTER_VALIDATE_FLOAT on bool(false)
FILTER_VALIDATE_FLOAT off bool(false)
FILTER_VALIDATE_FLOAT ABC bool(false)
FILTER_VALIDATE_FLOAT abc bool(false)
FILTER_VALIDATE_FLOAT あいう bool(false)
FILTER_VALIDATE_FLOAT 漢字 bool(false)
FILTER_VALIDATE_FLOAT <div>test</div> bool(false)
FILTER_VALIDATE_FLOAT ! bool(false)
FILTER_VALIDATE_FLOAT # bool(false)
FILTER_VALIDATE_FLOAT $ bool(false)
FILTER_VALIDATE_FLOAT % bool(false)
FILTER_VALIDATE_FLOAT & bool(false)
FILTER_VALIDATE_FLOAT bool(false)
FILTER_VALIDATE_FLOAT * bool(false)
FILTER_VALIDATE_FLOAT + bool(false)
FILTER_VALIDATE_FLOAT bool(false)
FILTER_VALIDATE_FLOAT = bool(false)
FILTER_VALIDATE_FLOAT ? bool(false)
FILTER_VALIDATE_FLOAT ^ bool(false)
FILTER_VALIDATE_FLOAT _ bool(false)
FILTER_VALIDATE_FLOAT ` bool(false)
FILTER_VALIDATE_FLOAT { bool(false)
FILTER_VALIDATE_FLOAT | bool(false)
FILTER_VALIDATE_FLOAT } bool(false)
FILTER_VALIDATE_FLOAT ~ bool(false)
FILTER_VALIDATE_FLOAT @ bool(false)
FILTER_VALIDATE_FLOAT . bool(false)
FILTER_VALIDATE_FLOAT [ bool(false)
FILTER_VALIDATE_FLOAT ] bool(false)
FILTER_VALIDATE_FLOAT ( ※半角 bool(false)
FILTER_VALIDATE_FLOAT ) ※半角 bool(false)
FILTER_VALIDATE_FLOAT ( ※全角 bool(false)
FILTER_VALIDATE_FLOAT ) ※全角 bool(false)
FILTER_VALIDATE_FLOAT bool(false)
FILTER_VALIDATE_FLOAT \ bool(false)
FILTER_VALIDATE_FLOAT ; bool(false)
FILTER_VALIDATE_FLOAT : bool(false)
FILTER_VALIDATE_FLOAT , bool(false)
FILTER_VALIDATE_FLOAT / bool(false)
FILTER_VALIDATE_FLOAT < bool(false)
FILTER_VALIDATE_FLOAT > bool(false)
FILTER_VALIDATE_FLOAT sample@example.jp bool(false)
FILTER_VALIDATE_FLOAT .sample@example.jp bool(false)
FILTER_VALIDATE_FLOAT sample.@example.jp bool(false)
FILTER_VALIDATE_FLOAT sam..ple@example.jp bool(false)
FILTER_VALIDATE_FLOAT test.sample@example.jp bool(false)
FILTER_VALIDATE_FLOAT myaddress+test2@gmail.com bool(false)
FILTER_VALIDATE_FLOAT 10.0.0.0/8 bool(false)
FILTER_VALIDATE_FLOAT 172.16.0.0/12 bool(false)
FILTER_VALIDATE_FLOAT 192.168.0.0/16 bool(false)
FILTER_VALIDATE_FLOAT 0.0.0.0/8 bool(false)
FILTER_VALIDATE_FLOAT 169.254.0.0/16 bool(false)
FILTER_VALIDATE_FLOAT 127.0.0.0/8 bool(false)
FILTER_VALIDATE_FLOAT 240.0.0.0/4 bool(false)
FILTER_VALIDATE_FLOAT 10.0.0.0 bool(false)
FILTER_VALIDATE_FLOAT 172.16.0.0 bool(false)
FILTER_VALIDATE_FLOAT 192.168.0.0 bool(false)
FILTER_VALIDATE_FLOAT 192.168.0.0:80 bool(false)
FILTER_VALIDATE_FLOAT 0.0.0.0 bool(false)
FILTER_VALIDATE_FLOAT 169.254.0.0 bool(false)
FILTER_VALIDATE_FLOAT 127.0.0.0 bool(false)
FILTER_VALIDATE_FLOAT 240.0.0.0 bool(false)
FILTER_VALIDATE_FLOAT :80 bool(false)
FILTER_VALIDATE_FLOAT localhost bool(false)
FILTER_VALIDATE_FLOAT ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_FLOAT FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_FLOAT FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_FLOAT FG:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_FLOAT 2001:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_FLOAT 12:34:56:78:9a:bc bool(false)
FILTER_VALIDATE_FLOAT http://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_FLOAT https://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_FLOAT ssh://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_FLOAT mailto:sample@example.jp bool(false)

値が float であるかどうかを検証し、成功した場合は値を float に変換します。
フィルタフラグ: カンマ (,) を数値の桁区切り文字として許可します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND NULL bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND (空) bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 0 float(0)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 1 float(1)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND -1 float(-1)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 0.1 float(0.1)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND -0.1 float(-0.1)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 10000 float(10000)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND “10,000” float(10000)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 01 float(1)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 0xabc float(2748)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND “0xghi” bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND true float(1)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND false bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND yes bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND no bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND on bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND off bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ABC bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND abc bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND あいう bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 漢字 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND <div>test</div> bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ! bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND # bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND $ bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND % bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND & bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND * bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND + bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND = bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ? bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ^ bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND _ bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ` bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND { bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND | bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND } bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ~ bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND @ bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND . bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND [ bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ] bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ( ※半角 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ) ※半角 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ( ※全角 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ) ※全角 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND \ bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ; bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND : bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND , bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND / bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND < bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND > bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND sample@example.jp bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND .sample@example.jp bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND sample.@example.jp bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND sam..ple@example.jp bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND test.sample@example.jp bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND myaddress+test2@gmail.com bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 10.0.0.0/8 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 172.16.0.0/12 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 192.168.0.0/16 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 0.0.0.0/8 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 169.254.0.0/16 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 127.0.0.0/8 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 240.0.0.0/4 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 10.0.0.0 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 172.16.0.0 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 192.168.0.0 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 192.168.0.0:80 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 0.0.0.0 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 169.254.0.0 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 127.0.0.0 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 240.0.0.0 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND :80 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND localhost bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND FG:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 2001:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 12:34:56:78:9a:bc bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND http://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND https://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ssh://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND mailto:sample@example.jp bool(false)

値が整数であるかどうか、オプションで指定した範囲内にあるかどうかを検証し、成功した場合は整数に変換します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_VALIDATE_INT NULL bool(false)
FILTER_VALIDATE_INT (空) bool(false)
FILTER_VALIDATE_INT 0 int(0)
FILTER_VALIDATE_INT 1 int(1)
FILTER_VALIDATE_INT -1 int(-1)
FILTER_VALIDATE_INT 0.1 bool(false)
FILTER_VALIDATE_INT -0.1 bool(false)
FILTER_VALIDATE_INT 10000 int(10000)
FILTER_VALIDATE_INT “10,000” bool(false)
FILTER_VALIDATE_INT 01 int(1)
FILTER_VALIDATE_INT 0xabc int(2748)
FILTER_VALIDATE_INT “0xghi” bool(false)
FILTER_VALIDATE_INT true int(1)
FILTER_VALIDATE_INT false bool(false)
FILTER_VALIDATE_INT yes bool(false)
FILTER_VALIDATE_INT no bool(false)
FILTER_VALIDATE_INT on bool(false)
FILTER_VALIDATE_INT off bool(false)
FILTER_VALIDATE_INT ABC bool(false)
FILTER_VALIDATE_INT abc bool(false)
FILTER_VALIDATE_INT あいう bool(false)
FILTER_VALIDATE_INT 漢字 bool(false)
FILTER_VALIDATE_INT <div>test</div> bool(false)
FILTER_VALIDATE_INT ! bool(false)
FILTER_VALIDATE_INT # bool(false)
FILTER_VALIDATE_INT $ bool(false)
FILTER_VALIDATE_INT % bool(false)
FILTER_VALIDATE_INT & bool(false)
FILTER_VALIDATE_INT bool(false)
FILTER_VALIDATE_INT * bool(false)
FILTER_VALIDATE_INT + bool(false)
FILTER_VALIDATE_INT bool(false)
FILTER_VALIDATE_INT = bool(false)
FILTER_VALIDATE_INT ? bool(false)
FILTER_VALIDATE_INT ^ bool(false)
FILTER_VALIDATE_INT _ bool(false)
FILTER_VALIDATE_INT ` bool(false)
FILTER_VALIDATE_INT { bool(false)
FILTER_VALIDATE_INT | bool(false)
FILTER_VALIDATE_INT } bool(false)
FILTER_VALIDATE_INT ~ bool(false)
FILTER_VALIDATE_INT @ bool(false)
FILTER_VALIDATE_INT . bool(false)
FILTER_VALIDATE_INT [ bool(false)
FILTER_VALIDATE_INT ] bool(false)
FILTER_VALIDATE_INT ( ※半角 bool(false)
FILTER_VALIDATE_INT ) ※半角 bool(false)
FILTER_VALIDATE_INT ( ※全角 bool(false)
FILTER_VALIDATE_INT ) ※全角 bool(false)
FILTER_VALIDATE_INT bool(false)
FILTER_VALIDATE_INT \ bool(false)
FILTER_VALIDATE_INT ; bool(false)
FILTER_VALIDATE_INT : bool(false)
FILTER_VALIDATE_INT , bool(false)
FILTER_VALIDATE_INT / bool(false)
FILTER_VALIDATE_INT < bool(false)
FILTER_VALIDATE_INT > bool(false)
FILTER_VALIDATE_INT sample@example.jp bool(false)
FILTER_VALIDATE_INT .sample@example.jp bool(false)
FILTER_VALIDATE_INT sample.@example.jp bool(false)
FILTER_VALIDATE_INT sam..ple@example.jp bool(false)
FILTER_VALIDATE_INT test.sample@example.jp bool(false)
FILTER_VALIDATE_INT myaddress+test2@gmail.com bool(false)
FILTER_VALIDATE_INT 10.0.0.0/8 bool(false)
FILTER_VALIDATE_INT 172.16.0.0/12 bool(false)
FILTER_VALIDATE_INT 192.168.0.0/16 bool(false)
FILTER_VALIDATE_INT 0.0.0.0/8 bool(false)
FILTER_VALIDATE_INT 169.254.0.0/16 bool(false)
FILTER_VALIDATE_INT 127.0.0.0/8 bool(false)
FILTER_VALIDATE_INT 240.0.0.0/4 bool(false)
FILTER_VALIDATE_INT 10.0.0.0 bool(false)
FILTER_VALIDATE_INT 172.16.0.0 bool(false)
FILTER_VALIDATE_INT 192.168.0.0 bool(false)
FILTER_VALIDATE_INT 192.168.0.0:80 bool(false)
FILTER_VALIDATE_INT 0.0.0.0 bool(false)
FILTER_VALIDATE_INT 169.254.0.0 bool(false)
FILTER_VALIDATE_INT 127.0.0.0 bool(false)
FILTER_VALIDATE_INT 240.0.0.0 bool(false)
FILTER_VALIDATE_INT :80 bool(false)
FILTER_VALIDATE_INT localhost bool(false)
FILTER_VALIDATE_INT ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_INT FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_INT FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_INT FG:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_INT 2001:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_INT 12:34:56:78:9a:bc bool(false)
FILTER_VALIDATE_INT http://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_INT https://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_INT ssh://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_INT mailto:sample@example.jp bool(false)

値が整数であるかどうか、オプションで指定した範囲内にあるかどうかを検証し、成功した場合は整数に変換します。
フィルタフラグ: ゼロ (0) で始まる入力を八進数とみなします。 ゼロの後には 0-7 しか続けることができません。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL NULL bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL (空) bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 0 int(0)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 1 int(1)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL -1 int(-1)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 0.1 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL -0.1 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 10000 int(10000)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL “10,000” bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 01 int(1)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 0xabc int(2748)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL “0xghi” bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL true int(1)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL false bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL yes bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL no bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL on bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL off bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL ABC bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL abc bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL あいう bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 漢字 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL <div>test</div> bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL ! bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL # bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL $ bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL % bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL & bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL * bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL + bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL = bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL ? bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL ^ bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL _ bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL ` bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL { bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL | bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL } bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL ~ bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL @ bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL . bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL [ bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL ] bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL ( ※半角 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL ) ※半角 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL ( ※全角 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL ) ※全角 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL \ bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL ; bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL : bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL , bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL / bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL < bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL > bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL sample@example.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL .sample@example.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL sample.@example.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL sam..ple@example.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL test.sample@example.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL myaddress+test2@gmail.com bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 10.0.0.0/8 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 172.16.0.0/12 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 192.168.0.0/16 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 0.0.0.0/8 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 169.254.0.0/16 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 127.0.0.0/8 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 240.0.0.0/4 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 10.0.0.0 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 172.16.0.0 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 192.168.0.0 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 192.168.0.0:80 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 0.0.0.0 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 169.254.0.0 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 127.0.0.0 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 240.0.0.0 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL :80 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL localhost bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL FG:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 2001:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL 12:34:56:78:9a:bc bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL http://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL https://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL ssh://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL mailto:sample@example.jp bool(false)

値が整数であるかどうか、オプションで指定した範囲内にあるかどうかを検証し、成功した場合は整数に変換します。
フィルタフラグ: 0x あるいは 0X で始まる入力を十六進数とみなします。 後に続けられる文字は a-fA-F0-9 だけです。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX NULL bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX (空) bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 0 int(0)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 1 int(1)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX -1 int(-1)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 0.1 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX -0.1 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 10000 int(10000)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX “10,000” bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 01 int(1)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 0xabc int(2748)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX “0xghi” bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX true int(1)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX false bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX yes bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX no bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX on bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX off bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ABC bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX abc bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX あいう bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 漢字 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX <div>test</div> bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ! bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX # bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX $ bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX % bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX & bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX * bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX + bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX = bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ? bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ^ bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX _ bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ` bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX { bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX | bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX } bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ~ bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX @ bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX . bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX [ bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ] bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ( ※半角 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ) ※半角 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ( ※全角 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ) ※全角 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX \ bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ; bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX : bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX , bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX / bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX < bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX > bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX sample@example.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX .sample@example.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX sample.@example.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX sam..ple@example.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX test.sample@example.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX myaddress+test2@gmail.com bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 10.0.0.0/8 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 172.16.0.0/12 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 192.168.0.0/16 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 0.0.0.0/8 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 169.254.0.0/16 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 127.0.0.0/8 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 240.0.0.0/4 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 10.0.0.0 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 172.16.0.0 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 192.168.0.0 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 192.168.0.0:80 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 0.0.0.0 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 169.254.0.0 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 127.0.0.0 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 240.0.0.0 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX :80 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX localhost bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX FG:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 2001:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX 12:34:56:78:9a:bc bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX http://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX https://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX ssh://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX mailto:sample@example.jp bool(false)

値が IP アドレスであるかどうかを検証します。 オプションで IPv4 あるいは IPv6 のみの指定、 プライベートアドレスや予約済みアドレスではないことの指定もできます。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_VALIDATE_IP NULL bool(false)
FILTER_VALIDATE_IP (空) bool(false)
FILTER_VALIDATE_IP 0 bool(false)
FILTER_VALIDATE_IP 1 bool(false)
FILTER_VALIDATE_IP -1 bool(false)
FILTER_VALIDATE_IP 0.1 bool(false)
FILTER_VALIDATE_IP -0.1 bool(false)
FILTER_VALIDATE_IP 10000 bool(false)
FILTER_VALIDATE_IP “10,000” bool(false)
FILTER_VALIDATE_IP 01 bool(false)
FILTER_VALIDATE_IP 0xabc bool(false)
FILTER_VALIDATE_IP “0xghi” bool(false)
FILTER_VALIDATE_IP true bool(false)
FILTER_VALIDATE_IP false bool(false)
FILTER_VALIDATE_IP yes bool(false)
FILTER_VALIDATE_IP no bool(false)
FILTER_VALIDATE_IP on bool(false)
FILTER_VALIDATE_IP off bool(false)
FILTER_VALIDATE_IP ABC bool(false)
FILTER_VALIDATE_IP abc bool(false)
FILTER_VALIDATE_IP あいう bool(false)
FILTER_VALIDATE_IP 漢字 bool(false)
FILTER_VALIDATE_IP <div>test</div> bool(false)
FILTER_VALIDATE_IP ! bool(false)
FILTER_VALIDATE_IP # bool(false)
FILTER_VALIDATE_IP $ bool(false)
FILTER_VALIDATE_IP % bool(false)
FILTER_VALIDATE_IP & bool(false)
FILTER_VALIDATE_IP bool(false)
FILTER_VALIDATE_IP * bool(false)
FILTER_VALIDATE_IP + bool(false)
FILTER_VALIDATE_IP bool(false)
FILTER_VALIDATE_IP = bool(false)
FILTER_VALIDATE_IP ? bool(false)
FILTER_VALIDATE_IP ^ bool(false)
FILTER_VALIDATE_IP _ bool(false)
FILTER_VALIDATE_IP ` bool(false)
FILTER_VALIDATE_IP { bool(false)
FILTER_VALIDATE_IP | bool(false)
FILTER_VALIDATE_IP } bool(false)
FILTER_VALIDATE_IP ~ bool(false)
FILTER_VALIDATE_IP @ bool(false)
FILTER_VALIDATE_IP . bool(false)
FILTER_VALIDATE_IP [ bool(false)
FILTER_VALIDATE_IP ] bool(false)
FILTER_VALIDATE_IP ( ※半角 bool(false)
FILTER_VALIDATE_IP ) ※半角 bool(false)
FILTER_VALIDATE_IP ( ※全角 bool(false)
FILTER_VALIDATE_IP ) ※全角 bool(false)
FILTER_VALIDATE_IP bool(false)
FILTER_VALIDATE_IP \ bool(false)
FILTER_VALIDATE_IP ; bool(false)
FILTER_VALIDATE_IP : bool(false)
FILTER_VALIDATE_IP , bool(false)
FILTER_VALIDATE_IP / bool(false)
FILTER_VALIDATE_IP < bool(false)
FILTER_VALIDATE_IP > bool(false)
FILTER_VALIDATE_IP sample@example.jp bool(false)
FILTER_VALIDATE_IP .sample@example.jp bool(false)
FILTER_VALIDATE_IP sample.@example.jp bool(false)
FILTER_VALIDATE_IP sam..ple@example.jp bool(false)
FILTER_VALIDATE_IP test.sample@example.jp bool(false)
FILTER_VALIDATE_IP myaddress+test2@gmail.com bool(false)
FILTER_VALIDATE_IP 10.0.0.0/8 bool(false)
FILTER_VALIDATE_IP 172.16.0.0/12 bool(false)
FILTER_VALIDATE_IP 192.168.0.0/16 bool(false)
FILTER_VALIDATE_IP 0.0.0.0/8 bool(false)
FILTER_VALIDATE_IP 169.254.0.0/16 bool(false)
FILTER_VALIDATE_IP 127.0.0.0/8 bool(false)
FILTER_VALIDATE_IP 240.0.0.0/4 bool(false)
FILTER_VALIDATE_IP 10.0.0.0 string(8) “10.0.0.0”
FILTER_VALIDATE_IP 172.16.0.0 string(10) “172.16.0.0”
FILTER_VALIDATE_IP 192.168.0.0 string(11) “192.168.0.0”
FILTER_VALIDATE_IP 192.168.0.0:80 bool(false)
FILTER_VALIDATE_IP 0.0.0.0 string(7) “0.0.0.0”
FILTER_VALIDATE_IP 169.254.0.0 string(11) “169.254.0.0”
FILTER_VALIDATE_IP 127.0.0.0 string(9) “127.0.0.0”
FILTER_VALIDATE_IP 240.0.0.0 string(9) “240.0.0.0”
FILTER_VALIDATE_IP :80 bool(false)
FILTER_VALIDATE_IP localhost bool(false)
FILTER_VALIDATE_IP ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_VALIDATE_IP FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_VALIDATE_IP FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_IP FG:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_IP 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_VALIDATE_IP 12:34:56:78:9a:bc bool(false)
FILTER_VALIDATE_IP http://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_IP https://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_IP ssh://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_IP mailto:sample@example.jp bool(false)

値が IP アドレスであるかどうかを検証します。 オプションで IPv4 あるいは IPv6 のみの指定、 プライベートアドレスや予約済みアドレスではないことの指定もできます。
フィルタフラグ: IPv4 形式の IP アドレスを許可します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 NULL bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 (空) bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 -1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 0.1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 -0.1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 10000 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 “10,000” bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 01 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 0xabc bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 “0xghi” bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 true bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 false bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 yes bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 no bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 on bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 off bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ABC bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 abc bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 あいう bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 漢字 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 <div>test</div> bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ! bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 # bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 $ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 % bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 & bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 * bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 + bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 = bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ? bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ^ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 _ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ` bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 { bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 } bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ~ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 @ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 . bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 [ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ] bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ( ※半角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) ※半角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ( ※全角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) ※全角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 \ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ; bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 : bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 , bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 / bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 < bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 > bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 sample@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 .sample@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 sample.@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 sam..ple@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 test.sample@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 myaddress+test2@gmail.com bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 10.0.0.0/8 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 172.16.0.0/12 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 192.168.0.0/16 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 0.0.0.0/8 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 169.254.0.0/16 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 127.0.0.0/8 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 240.0.0.0/4 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 10.0.0.0 string(8) “10.0.0.0”
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 172.16.0.0 string(10) “172.16.0.0”
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 192.168.0.0 string(11) “192.168.0.0”
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 192.168.0.0:80 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 0.0.0.0 string(7) “0.0.0.0”
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 169.254.0.0 string(11) “169.254.0.0”
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 127.0.0.0 string(9) “127.0.0.0”
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 240.0.0.0 string(9) “240.0.0.0”
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 :80 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 localhost bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 FG:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 2001:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 12:34:56:78:9a:bc bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 http://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 https://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ssh://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 mailto:sample@example.jp bool(false)

値が IP アドレスであるかどうかを検証します。 オプションで IPv4 あるいは IPv6 のみの指定、 プライベートアドレスや予約済みアドレスではないことの指定もできます。
フィルタフラグ: IPv6 形式の IP アドレスを許可します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 NULL bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 (空) bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 -1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 0.1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 -0.1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 10000 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 “10,000” bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 01 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 0xabc bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 “0xghi” bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 true bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 false bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 yes bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 no bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 on bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 off bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ABC bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 abc bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 あいう bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 漢字 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 <div>test</div> bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ! bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 # bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 $ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 % bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 & bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 * bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 + bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 = bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ? bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ^ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 _ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ` bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 { bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 | bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 } bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ~ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 @ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 . bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 [ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ] bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ( ※半角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ) ※半角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ( ※全角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ) ※全角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 \ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ; bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 : bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 , bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 / bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 < bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 > bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 sample@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 .sample@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 sample.@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 sam..ple@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 test.sample@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 myaddress+test2@gmail.com bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 10.0.0.0/8 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 172.16.0.0/12 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 192.168.0.0/16 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 0.0.0.0/8 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 169.254.0.0/16 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 127.0.0.0/8 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 240.0.0.0/4 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 10.0.0.0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 172.16.0.0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 192.168.0.0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 192.168.0.0:80 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 0.0.0.0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 169.254.0.0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 127.0.0.0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 240.0.0.0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 :80 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 localhost bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 FG:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 12:34:56:78:9a:bc bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 http://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 https://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ssh://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 mailto:sample@example.jp bool(false)

値が IP アドレスであるかどうかを検証します。 オプションで IPv4 あるいは IPv6 のみの指定、 プライベートアドレスや予約済みアドレスではないことの指定もできます。
フィルタフラグ: IPv4 プライベート領域 10.0.0.0/8, 172.16.0.0/12 および 192.168.0.0/16 を許可しません。FD あるいは FC ではじまる IPv6 アドレスを許可しません。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE NULL bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE (空) bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE -1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 0.1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE -0.1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 10000 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE “10,000” bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 01 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 0xabc bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE “0xghi” bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE true bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE false bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE yes bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE no bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE on bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE off bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ABC bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE abc bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE あいう bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 漢字 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE <div>test</div> bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ! bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE # bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE $ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE % bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE & bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE * bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE + bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE = bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ? bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ^ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE _ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ` bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE { bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE } bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ~ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE @ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE . bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE [ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ] bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ( ※半角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ) ※半角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ( ※全角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ) ※全角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE \ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ; bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE : bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE , bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE / bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE < bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE > bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE sample@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE .sample@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE sample.@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE sam..ple@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE test.sample@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE myaddress+test2@gmail.com bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 10.0.0.0/8 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 172.16.0.0/12 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 192.168.0.0/16 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 0.0.0.0/8 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 169.254.0.0/16 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 127.0.0.0/8 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 240.0.0.0/4 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 10.0.0.0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 172.16.0.0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 192.168.0.0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 192.168.0.0:80 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 0.0.0.0 string(7) “0.0.0.0”
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 169.254.0.0 string(11) “169.254.0.0”
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 127.0.0.0 string(9) “127.0.0.0”
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 240.0.0.0 string(9) “240.0.0.0”
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE :80 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE localhost bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE FG:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE 12:34:56:78:9a:bc bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE http://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE https://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ssh://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE mailto:sample@example.jp bool(false)

値が IP アドレスであるかどうかを検証します。 オプションで IPv4 あるいは IPv6 のみの指定、 プライベートアドレスや予約済みアドレスではないことの指定もできます。
フィルタフラグ: 予約済みの IPv4 範囲 0.0.0.0/8, 169.254.0.0/16, 127.0.0.0/8 および 240.0.0.0/4 を許可しません。予約済みの IPv6 範囲 ::1/128、::/128、 ::ffff:0:0/96 および fe80::/10 を許可しません。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE NULL bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE (空) bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE -1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 0.1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE -0.1 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 10000 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE “10,000” bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 01 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 0xabc bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE “0xghi” bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE true bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE false bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE yes bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE no bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE on bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE off bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE ABC bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE abc bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE あいう bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 漢字 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE <div>test</div> bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE ! bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE # bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE $ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE % bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE & bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE * bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE + bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE = bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE ? bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE ^ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE _ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE ` bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE { bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE | bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE } bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE ~ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE @ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE . bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE [ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE ] bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE ( ※半角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE ) ※半角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE ( ※全角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE ) ※全角 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE \ bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE ; bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE : bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE , bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE / bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE < bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE > bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE sample@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE .sample@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE sample.@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE sam..ple@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE test.sample@example.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE myaddress+test2@gmail.com bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 10.0.0.0/8 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 172.16.0.0/12 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 192.168.0.0/16 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 0.0.0.0/8 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 169.254.0.0/16 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 127.0.0.0/8 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 240.0.0.0/4 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 10.0.0.0 string(8) “10.0.0.0”
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 172.16.0.0 string(10) “172.16.0.0”
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 192.168.0.0 string(11) “192.168.0.0”
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 192.168.0.0:80 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 0.0.0.0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 169.254.0.0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 127.0.0.0 string(9) “127.0.0.0”
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 240.0.0.0 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE :80 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE localhost bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE FG:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE 12:34:56:78:9a:bc bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE http://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE https://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE ssh://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE mailto:sample@example.jp bool(false)

値が MAC アドレスであるかどうかを検証します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_VALIDATE_MAC NULL bool(false)
FILTER_VALIDATE_MAC (空) bool(false)
FILTER_VALIDATE_MAC 0 bool(false)
FILTER_VALIDATE_MAC 1 bool(false)
FILTER_VALIDATE_MAC -1 bool(false)
FILTER_VALIDATE_MAC 0.1 bool(false)
FILTER_VALIDATE_MAC -0.1 bool(false)
FILTER_VALIDATE_MAC 10000 bool(false)
FILTER_VALIDATE_MAC “10,000” bool(false)
FILTER_VALIDATE_MAC 01 bool(false)
FILTER_VALIDATE_MAC 0xabc bool(false)
FILTER_VALIDATE_MAC “0xghi” bool(false)
FILTER_VALIDATE_MAC true bool(false)
FILTER_VALIDATE_MAC false bool(false)
FILTER_VALIDATE_MAC yes bool(false)
FILTER_VALIDATE_MAC no bool(false)
FILTER_VALIDATE_MAC on bool(false)
FILTER_VALIDATE_MAC off bool(false)
FILTER_VALIDATE_MAC ABC bool(false)
FILTER_VALIDATE_MAC abc bool(false)
FILTER_VALIDATE_MAC あいう bool(false)
FILTER_VALIDATE_MAC 漢字 bool(false)
FILTER_VALIDATE_MAC <div>test</div> bool(false)
FILTER_VALIDATE_MAC ! bool(false)
FILTER_VALIDATE_MAC # bool(false)
FILTER_VALIDATE_MAC $ bool(false)
FILTER_VALIDATE_MAC % bool(false)
FILTER_VALIDATE_MAC & bool(false)
FILTER_VALIDATE_MAC bool(false)
FILTER_VALIDATE_MAC * bool(false)
FILTER_VALIDATE_MAC + bool(false)
FILTER_VALIDATE_MAC bool(false)
FILTER_VALIDATE_MAC = bool(false)
FILTER_VALIDATE_MAC ? bool(false)
FILTER_VALIDATE_MAC ^ bool(false)
FILTER_VALIDATE_MAC _ bool(false)
FILTER_VALIDATE_MAC ` bool(false)
FILTER_VALIDATE_MAC { bool(false)
FILTER_VALIDATE_MAC | bool(false)
FILTER_VALIDATE_MAC } bool(false)
FILTER_VALIDATE_MAC ~ bool(false)
FILTER_VALIDATE_MAC @ bool(false)
FILTER_VALIDATE_MAC . bool(false)
FILTER_VALIDATE_MAC [ bool(false)
FILTER_VALIDATE_MAC ] bool(false)
FILTER_VALIDATE_MAC ( ※半角 bool(false)
FILTER_VALIDATE_MAC ) ※半角 bool(false)
FILTER_VALIDATE_MAC ( ※全角 bool(false)
FILTER_VALIDATE_MAC ) ※全角 bool(false)
FILTER_VALIDATE_MAC bool(false)
FILTER_VALIDATE_MAC \ bool(false)
FILTER_VALIDATE_MAC ; bool(false)
FILTER_VALIDATE_MAC : bool(false)
FILTER_VALIDATE_MAC , bool(false)
FILTER_VALIDATE_MAC / bool(false)
FILTER_VALIDATE_MAC < bool(false)
FILTER_VALIDATE_MAC > bool(false)
FILTER_VALIDATE_MAC sample@example.jp bool(false)
FILTER_VALIDATE_MAC .sample@example.jp bool(false)
FILTER_VALIDATE_MAC sample.@example.jp bool(false)
FILTER_VALIDATE_MAC sam..ple@example.jp bool(false)
FILTER_VALIDATE_MAC test.sample@example.jp bool(false)
FILTER_VALIDATE_MAC myaddress+test2@gmail.com bool(false)
FILTER_VALIDATE_MAC 10.0.0.0/8 bool(false)
FILTER_VALIDATE_MAC 172.16.0.0/12 bool(false)
FILTER_VALIDATE_MAC 192.168.0.0/16 bool(false)
FILTER_VALIDATE_MAC 0.0.0.0/8 bool(false)
FILTER_VALIDATE_MAC 169.254.0.0/16 bool(false)
FILTER_VALIDATE_MAC 127.0.0.0/8 bool(false)
FILTER_VALIDATE_MAC 240.0.0.0/4 bool(false)
FILTER_VALIDATE_MAC 10.0.0.0 bool(false)
FILTER_VALIDATE_MAC 172.16.0.0 bool(false)
FILTER_VALIDATE_MAC 192.168.0.0 bool(false)
FILTER_VALIDATE_MAC 192.168.0.0:80 bool(false)
FILTER_VALIDATE_MAC 0.0.0.0 bool(false)
FILTER_VALIDATE_MAC 169.254.0.0 bool(false)
FILTER_VALIDATE_MAC 127.0.0.0 bool(false)
FILTER_VALIDATE_MAC 240.0.0.0 bool(false)
FILTER_VALIDATE_MAC :80 bool(false)
FILTER_VALIDATE_MAC localhost bool(false)
FILTER_VALIDATE_MAC ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_MAC FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_MAC FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_MAC FG:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_MAC 2001:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_MAC 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_VALIDATE_MAC http://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_MAC https://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_MAC ssh://www.yahoo.co.jp bool(false)
FILTER_VALIDATE_MAC mailto:sample@example.jp bool(false)

値が URL 形式である (» http://www.faqs.org/rfcs/rfc2396 に準拠している) かどうか、 オプションで、必須コンポーネントが含まれているかどうかを検証します。 妥当な URL が、HTTP プロトコル http:// を指定しているとは限りません。 つまり、その URL が期待通りのプロトコル (ssh:// や mailto: など) を使っているかどうか、さらなる検証が必要だということです。 この関数は、ASCII の URL のみを正しいとみなすことに注意しましょう。 国際化ドメイン名 (非 ASCII 文字を含むもの) は失敗します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_VALIDATE_URL NULL bool(false)
FILTER_VALIDATE_URL (空) bool(false)
FILTER_VALIDATE_URL 0 bool(false)
FILTER_VALIDATE_URL 1 bool(false)
FILTER_VALIDATE_URL -1 bool(false)
FILTER_VALIDATE_URL 0.1 bool(false)
FILTER_VALIDATE_URL -0.1 bool(false)
FILTER_VALIDATE_URL 10000 bool(false)
FILTER_VALIDATE_URL “10,000” bool(false)
FILTER_VALIDATE_URL 01 bool(false)
FILTER_VALIDATE_URL 0xabc bool(false)
FILTER_VALIDATE_URL “0xghi” bool(false)
FILTER_VALIDATE_URL true bool(false)
FILTER_VALIDATE_URL false bool(false)
FILTER_VALIDATE_URL yes bool(false)
FILTER_VALIDATE_URL no bool(false)
FILTER_VALIDATE_URL on bool(false)
FILTER_VALIDATE_URL off bool(false)
FILTER_VALIDATE_URL ABC bool(false)
FILTER_VALIDATE_URL abc bool(false)
FILTER_VALIDATE_URL あいう bool(false)
FILTER_VALIDATE_URL 漢字 bool(false)
FILTER_VALIDATE_URL <div>test</div> bool(false)
FILTER_VALIDATE_URL ! bool(false)
FILTER_VALIDATE_URL # bool(false)
FILTER_VALIDATE_URL $ bool(false)
FILTER_VALIDATE_URL % bool(false)
FILTER_VALIDATE_URL & bool(false)
FILTER_VALIDATE_URL bool(false)
FILTER_VALIDATE_URL * bool(false)
FILTER_VALIDATE_URL + bool(false)
FILTER_VALIDATE_URL bool(false)
FILTER_VALIDATE_URL = bool(false)
FILTER_VALIDATE_URL ? bool(false)
FILTER_VALIDATE_URL ^ bool(false)
FILTER_VALIDATE_URL _ bool(false)
FILTER_VALIDATE_URL ` bool(false)
FILTER_VALIDATE_URL { bool(false)
FILTER_VALIDATE_URL | bool(false)
FILTER_VALIDATE_URL } bool(false)
FILTER_VALIDATE_URL ~ bool(false)
FILTER_VALIDATE_URL @ bool(false)
FILTER_VALIDATE_URL . bool(false)
FILTER_VALIDATE_URL [ bool(false)
FILTER_VALIDATE_URL ] bool(false)
FILTER_VALIDATE_URL ( ※半角 bool(false)
FILTER_VALIDATE_URL ) ※半角 bool(false)
FILTER_VALIDATE_URL ( ※全角 bool(false)
FILTER_VALIDATE_URL ) ※全角 bool(false)
FILTER_VALIDATE_URL bool(false)
FILTER_VALIDATE_URL \ bool(false)
FILTER_VALIDATE_URL ; bool(false)
FILTER_VALIDATE_URL : bool(false)
FILTER_VALIDATE_URL , bool(false)
FILTER_VALIDATE_URL / bool(false)
FILTER_VALIDATE_URL < bool(false)
FILTER_VALIDATE_URL > bool(false)
FILTER_VALIDATE_URL sample@example.jp bool(false)
FILTER_VALIDATE_URL .sample@example.jp bool(false)
FILTER_VALIDATE_URL sample.@example.jp bool(false)
FILTER_VALIDATE_URL sam..ple@example.jp bool(false)
FILTER_VALIDATE_URL test.sample@example.jp bool(false)
FILTER_VALIDATE_URL myaddress+test2@gmail.com bool(false)
FILTER_VALIDATE_URL 10.0.0.0/8 bool(false)
FILTER_VALIDATE_URL 172.16.0.0/12 bool(false)
FILTER_VALIDATE_URL 192.168.0.0/16 bool(false)
FILTER_VALIDATE_URL 0.0.0.0/8 bool(false)
FILTER_VALIDATE_URL 169.254.0.0/16 bool(false)
FILTER_VALIDATE_URL 127.0.0.0/8 bool(false)
FILTER_VALIDATE_URL 240.0.0.0/4 bool(false)
FILTER_VALIDATE_URL 10.0.0.0 bool(false)
FILTER_VALIDATE_URL 172.16.0.0 bool(false)
FILTER_VALIDATE_URL 192.168.0.0 bool(false)
FILTER_VALIDATE_URL 192.168.0.0:80 bool(false)
FILTER_VALIDATE_URL 0.0.0.0 bool(false)
FILTER_VALIDATE_URL 169.254.0.0 bool(false)
FILTER_VALIDATE_URL 127.0.0.0 bool(false)
FILTER_VALIDATE_URL 240.0.0.0 bool(false)
FILTER_VALIDATE_URL :80 bool(false)
FILTER_VALIDATE_URL localhost bool(false)
FILTER_VALIDATE_URL ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_URL FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_URL FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 bool(false)
FILTER_VALIDATE_URL FG:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_URL 2001:DB8:0:0:8:800:200C:417A bool(false)
FILTER_VALIDATE_URL 12:34:56:78:9a:bc bool(false)
FILTER_VALIDATE_URL http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_VALIDATE_URL https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_VALIDATE_URL ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_VALIDATE_URL mailto:sample@example.jp string(24) “mailto:sample@example.jp”

除去フィルタ

英字、数字および !#$%&’*+-=?^_`{|}~@.[] 以外のすべての文字を取り除きます。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_EMAIL NULL string(0) “”
FILTER_SANITIZE_EMAIL (空) string(0) “”
FILTER_SANITIZE_EMAIL 0 string(1) “0”
FILTER_SANITIZE_EMAIL 1 string(1) “1”
FILTER_SANITIZE_EMAIL -1 string(2) “-1”
FILTER_SANITIZE_EMAIL 0.1 string(3) “0.1”
FILTER_SANITIZE_EMAIL -0.1 string(4) “-0.1”
FILTER_SANITIZE_EMAIL 10000 string(5) “10000”
FILTER_SANITIZE_EMAIL “10,000” string(5) “10000”
FILTER_SANITIZE_EMAIL 01 string(1) “1”
FILTER_SANITIZE_EMAIL 0xabc string(4) “2748”
FILTER_SANITIZE_EMAIL “0xghi” string(5) “0xghi”
FILTER_SANITIZE_EMAIL true string(1) “1”
FILTER_SANITIZE_EMAIL false string(0) “”
FILTER_SANITIZE_EMAIL yes string(3) “yes”
FILTER_SANITIZE_EMAIL no string(2) “no”
FILTER_SANITIZE_EMAIL on string(2) “on”
FILTER_SANITIZE_EMAIL off string(3) “off”
FILTER_SANITIZE_EMAIL ABC string(3) “ABC”
FILTER_SANITIZE_EMAIL abc string(3) “abc”
FILTER_SANITIZE_EMAIL あいう string(0) “”
FILTER_SANITIZE_EMAIL 漢字 string(0) “”
FILTER_SANITIZE_EMAIL <div>test</div> string(10) “divtestdiv”
FILTER_SANITIZE_EMAIL ! string(1) “!”
FILTER_SANITIZE_EMAIL # string(1) “#”
FILTER_SANITIZE_EMAIL $ string(1) “$”
FILTER_SANITIZE_EMAIL % string(1) “%”
FILTER_SANITIZE_EMAIL & string(1) “&”
FILTER_SANITIZE_EMAIL string(1) “‘”
FILTER_SANITIZE_EMAIL * string(1) “*”
FILTER_SANITIZE_EMAIL + string(1) “+”
FILTER_SANITIZE_EMAIL string(1) “-“
FILTER_SANITIZE_EMAIL = string(1) “=”
FILTER_SANITIZE_EMAIL ? string(1) “?”
FILTER_SANITIZE_EMAIL ^ string(1) “^”
FILTER_SANITIZE_EMAIL _ string(1) “_”
FILTER_SANITIZE_EMAIL ` string(1) “`”
FILTER_SANITIZE_EMAIL { string(1) “{“
FILTER_SANITIZE_EMAIL | string(1) “|”
FILTER_SANITIZE_EMAIL } string(1) “}”
FILTER_SANITIZE_EMAIL ~ string(1) “~”
FILTER_SANITIZE_EMAIL @ string(1) “@”
FILTER_SANITIZE_EMAIL . string(1) “.”
FILTER_SANITIZE_EMAIL [ string(1) “[“
FILTER_SANITIZE_EMAIL ] string(1) “]”
FILTER_SANITIZE_EMAIL ( ※半角 string(0) “”
FILTER_SANITIZE_EMAIL ) ※半角 string(0) “”
FILTER_SANITIZE_EMAIL ( ※全角 string(0) “”
FILTER_SANITIZE_EMAIL ) ※全角 string(0) “”
FILTER_SANITIZE_EMAIL string(0) “”
FILTER_SANITIZE_EMAIL \ string(0) “”
FILTER_SANITIZE_EMAIL ; string(0) “”
FILTER_SANITIZE_EMAIL : string(0) “”
FILTER_SANITIZE_EMAIL , string(0) “”
FILTER_SANITIZE_EMAIL / string(0) “”
FILTER_SANITIZE_EMAIL < string(0) “”
FILTER_SANITIZE_EMAIL > string(0) “”
FILTER_SANITIZE_EMAIL sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_EMAIL .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_EMAIL sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_EMAIL sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_EMAIL test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_EMAIL myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_EMAIL 10.0.0.0/8 string(9) “10.0.0.08”
FILTER_SANITIZE_EMAIL 172.16.0.0/12 string(12) “172.16.0.012”
FILTER_SANITIZE_EMAIL 192.168.0.0/16 string(13) “192.168.0.016”
FILTER_SANITIZE_EMAIL 0.0.0.0/8 string(8) “0.0.0.08”
FILTER_SANITIZE_EMAIL 169.254.0.0/16 string(13) “169.254.0.016”
FILTER_SANITIZE_EMAIL 127.0.0.0/8 string(10) “127.0.0.08”
FILTER_SANITIZE_EMAIL 240.0.0.0/4 string(10) “240.0.0.04”
FILTER_SANITIZE_EMAIL 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_EMAIL 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_EMAIL 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_EMAIL 192.168.0.0:80 string(13) “192.168.0.080”
FILTER_SANITIZE_EMAIL 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_EMAIL 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_EMAIL 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_EMAIL 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_EMAIL :80 string(2) “80”
FILTER_SANITIZE_EMAIL localhost string(9) “localhost”
FILTER_SANITIZE_EMAIL ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(32) “ABCDEF0123456789ABCDEF0123456789”
FILTER_SANITIZE_EMAIL FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(32) “FDCDEF0123456789ABCDEF0123456789”
FILTER_SANITIZE_EMAIL FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(32) “FGCDEF0123456789ABCDEF0123456789”
FILTER_SANITIZE_EMAIL FG:DB8:0:0:8:800:200C:417A string(19) “FGDB8008800200C417A”
FILTER_SANITIZE_EMAIL 2001:DB8:0:0:8:800:200C:417A string(21) “2001DB8008800200C417A”
FILTER_SANITIZE_EMAIL 12:34:56:78:9a:bc string(12) “123456789abc”
FILTER_SANITIZE_EMAIL http://www.yahoo.co.jp string(19) “httpwww.yahoo.co.jp”
FILTER_SANITIZE_EMAIL https://www.yahoo.co.jp string(20) “httpswww.yahoo.co.jp”
FILTER_SANITIZE_EMAIL ssh://www.yahoo.co.jp string(18) “sshwww.yahoo.co.jp”
FILTER_SANITIZE_EMAIL mailto:sample@example.jp string(23) “mailtosample@example.jp”

文字列を URL エンコードします。オプションで、 特殊文字を取り除いたりエンコードしたりします。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_ENCODED NULL string(0) “”
FILTER_SANITIZE_ENCODED (空) string(0) “”
FILTER_SANITIZE_ENCODED 0 string(1) “0”
FILTER_SANITIZE_ENCODED 1 string(1) “1”
FILTER_SANITIZE_ENCODED -1 string(2) “-1”
FILTER_SANITIZE_ENCODED 0.1 string(3) “0.1”
FILTER_SANITIZE_ENCODED -0.1 string(4) “-0.1”
FILTER_SANITIZE_ENCODED 10000 string(5) “10000”
FILTER_SANITIZE_ENCODED “10,000” string(8) “10%2C000”
FILTER_SANITIZE_ENCODED 01 string(1) “1”
FILTER_SANITIZE_ENCODED 0xabc string(4) “2748”
FILTER_SANITIZE_ENCODED “0xghi” string(5) “0xghi”
FILTER_SANITIZE_ENCODED true string(1) “1”
FILTER_SANITIZE_ENCODED false string(0) “”
FILTER_SANITIZE_ENCODED yes string(3) “yes”
FILTER_SANITIZE_ENCODED no string(2) “no”
FILTER_SANITIZE_ENCODED on string(2) “on”
FILTER_SANITIZE_ENCODED off string(3) “off”
FILTER_SANITIZE_ENCODED ABC string(3) “ABC”
FILTER_SANITIZE_ENCODED abc string(3) “abc”
FILTER_SANITIZE_ENCODED あいう string(27) “%E3%81%82%E3%81%84%E3%81%86”
FILTER_SANITIZE_ENCODED 漢字 string(18) “%E6%BC%A2%E5%AD%97”
FILTER_SANITIZE_ENCODED <div>test</div> string(25) “%3Cdiv%3Etest%3C%2Fdiv%3E”
FILTER_SANITIZE_ENCODED ! string(3) “%21”
FILTER_SANITIZE_ENCODED # string(3) “%23”
FILTER_SANITIZE_ENCODED $ string(3) “%24”
FILTER_SANITIZE_ENCODED % string(3) “%25”
FILTER_SANITIZE_ENCODED & string(3) “%26”
FILTER_SANITIZE_ENCODED string(3) “%27”
FILTER_SANITIZE_ENCODED * string(3) “%2A”
FILTER_SANITIZE_ENCODED + string(3) “%2B”
FILTER_SANITIZE_ENCODED string(1) “-“
FILTER_SANITIZE_ENCODED = string(3) “%3D”
FILTER_SANITIZE_ENCODED ? string(3) “%3F”
FILTER_SANITIZE_ENCODED ^ string(3) “%5E”
FILTER_SANITIZE_ENCODED _ string(1) “_”
FILTER_SANITIZE_ENCODED ` string(3) “%60”
FILTER_SANITIZE_ENCODED { string(3) “%7B”
FILTER_SANITIZE_ENCODED | string(3) “%7C”
FILTER_SANITIZE_ENCODED } string(3) “%7D”
FILTER_SANITIZE_ENCODED ~ string(3) “%7E”
FILTER_SANITIZE_ENCODED @ string(3) “%40”
FILTER_SANITIZE_ENCODED . string(1) “.”
FILTER_SANITIZE_ENCODED [ string(3) “%5B”
FILTER_SANITIZE_ENCODED ] string(3) “%5D”
FILTER_SANITIZE_ENCODED ( ※半角 string(3) “%28”
FILTER_SANITIZE_ENCODED ) ※半角 string(3) “%29”
FILTER_SANITIZE_ENCODED ( ※全角 string(9) “%EF%BC%88”
FILTER_SANITIZE_ENCODED ) ※全角 string(9) “%EF%BC%89”
FILTER_SANITIZE_ENCODED string(3) “%22”
FILTER_SANITIZE_ENCODED \ string(3) “%5C”
FILTER_SANITIZE_ENCODED ; string(3) “%3B”
FILTER_SANITIZE_ENCODED : string(3) “%3A”
FILTER_SANITIZE_ENCODED , string(3) “%2C”
FILTER_SANITIZE_ENCODED / string(3) “%2F”
FILTER_SANITIZE_ENCODED < string(3) “%3C”
FILTER_SANITIZE_ENCODED > string(3) “%3E”
FILTER_SANITIZE_ENCODED sample@example.jp string(19) “sample%40example.jp”
FILTER_SANITIZE_ENCODED .sample@example.jp string(20) “.sample%40example.jp”
FILTER_SANITIZE_ENCODED sample.@example.jp string(20) “sample.%40example.jp”
FILTER_SANITIZE_ENCODED sam..ple@example.jp string(21) “sam..ple%40example.jp”
FILTER_SANITIZE_ENCODED test.sample@example.jp string(24) “test.sample%40example.jp”
FILTER_SANITIZE_ENCODED myaddress+test2@gmail.com string(29) “myaddress%2Btest2%40gmail.com”
FILTER_SANITIZE_ENCODED 10.0.0.0/8 string(12) “10.0.0.0%2F8”
FILTER_SANITIZE_ENCODED 172.16.0.0/12 string(15) “172.16.0.0%2F12”
FILTER_SANITIZE_ENCODED 192.168.0.0/16 string(16) “192.168.0.0%2F16”
FILTER_SANITIZE_ENCODED 0.0.0.0/8 string(11) “0.0.0.0%2F8”
FILTER_SANITIZE_ENCODED 169.254.0.0/16 string(16) “169.254.0.0%2F16”
FILTER_SANITIZE_ENCODED 127.0.0.0/8 string(13) “127.0.0.0%2F8”
FILTER_SANITIZE_ENCODED 240.0.0.0/4 string(13) “240.0.0.0%2F4”
FILTER_SANITIZE_ENCODED 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_ENCODED 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_ENCODED 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_ENCODED 192.168.0.0:80 string(16) “192.168.0.0%3A80”
FILTER_SANITIZE_ENCODED 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_ENCODED 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_ENCODED 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_ENCODED 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_ENCODED :80 string(5) “%3A80”
FILTER_SANITIZE_ENCODED localhost string(9) “localhost”
FILTER_SANITIZE_ENCODED ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “ABCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “FDCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “FGCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED FG:DB8:0:0:8:800:200C:417A string(40) “FG%3ADB8%3A0%3A0%3A8%3A800%3A200C%3A417A”
FILTER_SANITIZE_ENCODED 2001:DB8:0:0:8:800:200C:417A string(42) “2001%3ADB8%3A0%3A0%3A8%3A800%3A200C%3A417A”
FILTER_SANITIZE_ENCODED 12:34:56:78:9a:bc string(27) “12%3A34%3A56%3A78%3A9a%3Abc”
FILTER_SANITIZE_ENCODED http://www.yahoo.co.jp string(28) “http%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED https://www.yahoo.co.jp string(29) “https%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED ssh://www.yahoo.co.jp string(27) “ssh%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED mailto:sample@example.jp string(28) “mailto%3Asample%40example.jp”

文字列を URL エンコードします。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: コードが 32 未満の文字を除去します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW NULL string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW (空) string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 0 string(1) “0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 1 string(1) “1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW -1 string(2) “-1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 0.1 string(3) “0.1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW -0.1 string(4) “-0.1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 10000 string(5) “10000”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW “10,000” string(8) “10%2C000”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 01 string(1) “1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 0xabc string(4) “2748”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW “0xghi” string(5) “0xghi”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW true string(1) “1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW false string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW yes string(3) “yes”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW no string(2) “no”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW on string(2) “on”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW off string(3) “off”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW ABC string(3) “ABC”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW abc string(3) “abc”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW あいう string(27) “%E3%81%82%E3%81%84%E3%81%86”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 漢字 string(18) “%E6%BC%A2%E5%AD%97”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW <div>test</div> string(25) “%3Cdiv%3Etest%3C%2Fdiv%3E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW ! string(3) “%21”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW # string(3) “%23”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW $ string(3) “%24”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW % string(3) “%25”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW & string(3) “%26”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW string(3) “%27”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW * string(3) “%2A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW + string(3) “%2B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW string(1) “-“
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW = string(3) “%3D”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW ? string(3) “%3F”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW ^ string(3) “%5E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW _ string(1) “_”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW ` string(3) “%60”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW { string(3) “%7B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW | string(3) “%7C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW } string(3) “%7D”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW ~ string(3) “%7E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW @ string(3) “%40”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW . string(1) “.”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW [ string(3) “%5B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW ] string(3) “%5D”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW ( ※半角 string(3) “%28”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW ) ※半角 string(3) “%29”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW ( ※全角 string(9) “%EF%BC%88”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW ) ※全角 string(9) “%EF%BC%89”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW string(3) “%22”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW \ string(3) “%5C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW ; string(3) “%3B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW : string(3) “%3A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW , string(3) “%2C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW / string(3) “%2F”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW < string(3) “%3C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW > string(3) “%3E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW sample@example.jp string(19) “sample%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW .sample@example.jp string(20) “.sample%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW sample.@example.jp string(20) “sample.%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW sam..ple@example.jp string(21) “sam..ple%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW test.sample@example.jp string(24) “test.sample%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW myaddress+test2@gmail.com string(29) “myaddress%2Btest2%40gmail.com”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 10.0.0.0/8 string(12) “10.0.0.0%2F8”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 172.16.0.0/12 string(15) “172.16.0.0%2F12”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 192.168.0.0/16 string(16) “192.168.0.0%2F16”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 0.0.0.0/8 string(11) “0.0.0.0%2F8”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 169.254.0.0/16 string(16) “169.254.0.0%2F16”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 127.0.0.0/8 string(13) “127.0.0.0%2F8”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 240.0.0.0/4 string(13) “240.0.0.0%2F4”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 192.168.0.0:80 string(16) “192.168.0.0%3A80”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW :80 string(5) “%3A80”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW localhost string(9) “localhost”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “ABCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “FDCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “FGCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW FG:DB8:0:0:8:800:200C:417A string(40) “FG%3ADB8%3A0%3A0%3A8%3A800%3A200C%3A417A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 2001:DB8:0:0:8:800:200C:417A string(42) “2001%3ADB8%3A0%3A0%3A8%3A800%3A200C%3A417A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW 12:34:56:78:9a:bc string(27) “12%3A34%3A56%3A78%3A9a%3Abc”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW http://www.yahoo.co.jp string(28) “http%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW https://www.yahoo.co.jp string(29) “https%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW ssh://www.yahoo.co.jp string(27) “ssh%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW mailto:sample@example.jp string(28) “mailto%3Asample%40example.jp”

文字列を URL エンコードします。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: コードが 127 より大きい文字を除去します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH NULL string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH (空) string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 0 string(1) “0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 1 string(1) “1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH -1 string(2) “-1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 0.1 string(3) “0.1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH -0.1 string(4) “-0.1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 10000 string(5) “10000”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH “10,000” string(8) “10%2C000”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 01 string(1) “1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 0xabc string(4) “2748”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH “0xghi” string(5) “0xghi”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH true string(1) “1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH false string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH yes string(3) “yes”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH no string(2) “no”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH on string(2) “on”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH off string(3) “off”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH ABC string(3) “ABC”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH abc string(3) “abc”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH あいう string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 漢字 string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH <div>test</div> string(25) “%3Cdiv%3Etest%3C%2Fdiv%3E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH ! string(3) “%21”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH # string(3) “%23”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH $ string(3) “%24”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH % string(3) “%25”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH & string(3) “%26”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH string(3) “%27”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH * string(3) “%2A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH + string(3) “%2B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH string(1) “-“
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH = string(3) “%3D”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH ? string(3) “%3F”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH ^ string(3) “%5E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH _ string(1) “_”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH ` string(3) “%60”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH { string(3) “%7B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH | string(3) “%7C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH } string(3) “%7D”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH ~ string(3) “%7E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH @ string(3) “%40”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH . string(1) “.”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH [ string(3) “%5B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH ] string(3) “%5D”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH ( ※半角 string(3) “%28”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH ) ※半角 string(3) “%29”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH ( ※全角 string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH ) ※全角 string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH string(3) “%22”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH \ string(3) “%5C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH ; string(3) “%3B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH : string(3) “%3A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH , string(3) “%2C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH / string(3) “%2F”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH < string(3) “%3C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH > string(3) “%3E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH sample@example.jp string(19) “sample%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH .sample@example.jp string(20) “.sample%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH sample.@example.jp string(20) “sample.%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH sam..ple@example.jp string(21) “sam..ple%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH test.sample@example.jp string(24) “test.sample%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH myaddress+test2@gmail.com string(29) “myaddress%2Btest2%40gmail.com”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 10.0.0.0/8 string(12) “10.0.0.0%2F8”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 172.16.0.0/12 string(15) “172.16.0.0%2F12”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 192.168.0.0/16 string(16) “192.168.0.0%2F16”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 0.0.0.0/8 string(11) “0.0.0.0%2F8”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 169.254.0.0/16 string(16) “169.254.0.0%2F16”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 127.0.0.0/8 string(13) “127.0.0.0%2F8”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 240.0.0.0/4 string(13) “240.0.0.0%2F4”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 192.168.0.0:80 string(16) “192.168.0.0%3A80”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH :80 string(5) “%3A80”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH localhost string(9) “localhost”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “ABCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “FDCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “FGCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH FG:DB8:0:0:8:800:200C:417A string(40) “FG%3ADB8%3A0%3A0%3A8%3A800%3A200C%3A417A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 2001:DB8:0:0:8:800:200C:417A string(42) “2001%3ADB8%3A0%3A0%3A8%3A800%3A200C%3A417A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH 12:34:56:78:9a:bc string(27) “12%3A34%3A56%3A78%3A9a%3Abc”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH http://www.yahoo.co.jp string(28) “http%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH https://www.yahoo.co.jp string(29) “https%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH ssh://www.yahoo.co.jp string(27) “ssh%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH mailto:sample@example.jp string(28) “mailto%3Asample%40example.jp”

文字列を URL エンコードします。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: バックティック文字を除去します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK NULL string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK (空) string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 0 string(1) “0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 1 string(1) “1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK -1 string(2) “-1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 0.1 string(3) “0.1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK -0.1 string(4) “-0.1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 10000 string(5) “10000”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK “10,000” string(8) “10%2C000”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 01 string(1) “1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 0xabc string(4) “2748”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK “0xghi” string(5) “0xghi”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK true string(1) “1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK false string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK yes string(3) “yes”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK no string(2) “no”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK on string(2) “on”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK off string(3) “off”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK ABC string(3) “ABC”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK abc string(3) “abc”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK あいう string(27) “%E3%81%82%E3%81%84%E3%81%86”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 漢字 string(18) “%E6%BC%A2%E5%AD%97”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK <div>test</div> string(25) “%3Cdiv%3Etest%3C%2Fdiv%3E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK ! string(3) “%21”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK # string(3) “%23”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK $ string(3) “%24”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK % string(3) “%25”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK & string(3) “%26”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK string(3) “%27”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK * string(3) “%2A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK + string(3) “%2B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK string(1) “-“
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK = string(3) “%3D”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK ? string(3) “%3F”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK ^ string(3) “%5E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK _ string(1) “_”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK ` string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK { string(3) “%7B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK | string(3) “%7C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK } string(3) “%7D”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK ~ string(3) “%7E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK @ string(3) “%40”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK . string(1) “.”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK [ string(3) “%5B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK ] string(3) “%5D”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK ( ※半角 string(3) “%28”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK ) ※半角 string(3) “%29”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK ( ※全角 string(9) “%EF%BC%88”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK ) ※全角 string(9) “%EF%BC%89”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK string(3) “%22”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK \ string(3) “%5C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK ; string(3) “%3B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK : string(3) “%3A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK , string(3) “%2C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK / string(3) “%2F”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK < string(3) “%3C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK > string(3) “%3E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK sample@example.jp string(19) “sample%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK .sample@example.jp string(20) “.sample%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK sample.@example.jp string(20) “sample.%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK sam..ple@example.jp string(21) “sam..ple%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK test.sample@example.jp string(24) “test.sample%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK myaddress+test2@gmail.com string(29) “myaddress%2Btest2%40gmail.com”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 10.0.0.0/8 string(12) “10.0.0.0%2F8”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 172.16.0.0/12 string(15) “172.16.0.0%2F12”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 192.168.0.0/16 string(16) “192.168.0.0%2F16”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 0.0.0.0/8 string(11) “0.0.0.0%2F8”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 169.254.0.0/16 string(16) “169.254.0.0%2F16”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 127.0.0.0/8 string(13) “127.0.0.0%2F8”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 240.0.0.0/4 string(13) “240.0.0.0%2F4”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 192.168.0.0:80 string(16) “192.168.0.0%3A80”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK :80 string(5) “%3A80”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK localhost string(9) “localhost”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “ABCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “FDCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “FGCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK FG:DB8:0:0:8:800:200C:417A string(40) “FG%3ADB8%3A0%3A0%3A8%3A800%3A200C%3A417A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 2001:DB8:0:0:8:800:200C:417A string(42) “2001%3ADB8%3A0%3A0%3A8%3A800%3A200C%3A417A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK 12:34:56:78:9a:bc string(27) “12%3A34%3A56%3A78%3A9a%3Abc”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK http://www.yahoo.co.jp string(28) “http%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK https://www.yahoo.co.jp string(29) “https%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK ssh://www.yahoo.co.jp string(27) “ssh%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK mailto:sample@example.jp string(28) “mailto%3Asample%40example.jp”

文字列を URL エンコードします。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: コードが 32 未満のすべての文字をエンコードします。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW NULL string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW (空) string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 0 string(1) “0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 1 string(1) “1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW -1 string(2) “-1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 0.1 string(3) “0.1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW -0.1 string(4) “-0.1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 10000 string(5) “10000”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW “10,000” string(8) “10%2C000”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 01 string(1) “1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 0xabc string(4) “2748”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW “0xghi” string(5) “0xghi”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW true string(1) “1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW false string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW yes string(3) “yes”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW no string(2) “no”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW on string(2) “on”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW off string(3) “off”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW ABC string(3) “ABC”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW abc string(3) “abc”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW あいう string(27) “%E3%81%82%E3%81%84%E3%81%86”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 漢字 string(18) “%E6%BC%A2%E5%AD%97”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW <div>test</div> string(25) “%3Cdiv%3Etest%3C%2Fdiv%3E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW ! string(3) “%21”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW # string(3) “%23”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW $ string(3) “%24”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW % string(3) “%25”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW & string(3) “%26”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW string(3) “%27”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW * string(3) “%2A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW + string(3) “%2B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW string(1) “-“
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW = string(3) “%3D”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW ? string(3) “%3F”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW ^ string(3) “%5E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW _ string(1) “_”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW ` string(3) “%60”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW { string(3) “%7B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW | string(3) “%7C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW } string(3) “%7D”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW ~ string(3) “%7E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW @ string(3) “%40”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW . string(1) “.”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW [ string(3) “%5B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW ] string(3) “%5D”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW ( ※半角 string(3) “%28”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW ) ※半角 string(3) “%29”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW ( ※全角 string(9) “%EF%BC%88”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW ) ※全角 string(9) “%EF%BC%89”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW string(3) “%22”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW \ string(3) “%5C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW ; string(3) “%3B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW : string(3) “%3A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW , string(3) “%2C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW / string(3) “%2F”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW < string(3) “%3C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW > string(3) “%3E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW sample@example.jp string(19) “sample%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW .sample@example.jp string(20) “.sample%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW sample.@example.jp string(20) “sample.%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW sam..ple@example.jp string(21) “sam..ple%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW test.sample@example.jp string(24) “test.sample%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW myaddress+test2@gmail.com string(29) “myaddress%2Btest2%40gmail.com”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 10.0.0.0/8 string(12) “10.0.0.0%2F8”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 172.16.0.0/12 string(15) “172.16.0.0%2F12”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 192.168.0.0/16 string(16) “192.168.0.0%2F16”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 0.0.0.0/8 string(11) “0.0.0.0%2F8”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 169.254.0.0/16 string(16) “169.254.0.0%2F16”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 127.0.0.0/8 string(13) “127.0.0.0%2F8”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 240.0.0.0/4 string(13) “240.0.0.0%2F4”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 192.168.0.0:80 string(16) “192.168.0.0%3A80”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW :80 string(5) “%3A80”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW localhost string(9) “localhost”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “ABCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “FDCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “FGCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW FG:DB8:0:0:8:800:200C:417A string(40) “FG%3ADB8%3A0%3A0%3A8%3A800%3A200C%3A417A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 2001:DB8:0:0:8:800:200C:417A string(42) “2001%3ADB8%3A0%3A0%3A8%3A800%3A200C%3A417A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW 12:34:56:78:9a:bc string(27) “12%3A34%3A56%3A78%3A9a%3Abc”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW http://www.yahoo.co.jp string(28) “http%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW https://www.yahoo.co.jp string(29) “https%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW ssh://www.yahoo.co.jp string(27) “ssh%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW mailto:sample@example.jp string(28) “mailto%3Asample%40example.jp”

文字列を URL エンコードします。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: コードが 127 より大きいすべての文字をエンコードします。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH NULL string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH (空) string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 0 string(1) “0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 1 string(1) “1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH -1 string(2) “-1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 0.1 string(3) “0.1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH -0.1 string(4) “-0.1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 10000 string(5) “10000”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH “10,000” string(8) “10%2C000”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 01 string(1) “1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 0xabc string(4) “2748”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH “0xghi” string(5) “0xghi”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH true string(1) “1”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH false string(0) “”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH yes string(3) “yes”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH no string(2) “no”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH on string(2) “on”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH off string(3) “off”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH ABC string(3) “ABC”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH abc string(3) “abc”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH あいう string(27) “%E3%81%82%E3%81%84%E3%81%86”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 漢字 string(18) “%E6%BC%A2%E5%AD%97”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH <div>test</div> string(25) “%3Cdiv%3Etest%3C%2Fdiv%3E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH ! string(3) “%21”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH # string(3) “%23”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH $ string(3) “%24”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH % string(3) “%25”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH & string(3) “%26”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH string(3) “%27”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH * string(3) “%2A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH + string(3) “%2B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH string(1) “-“
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH = string(3) “%3D”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH ? string(3) “%3F”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH ^ string(3) “%5E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH _ string(1) “_”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH ` string(3) “%60”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH { string(3) “%7B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH | string(3) “%7C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH } string(3) “%7D”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH ~ string(3) “%7E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH @ string(3) “%40”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH . string(1) “.”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH [ string(3) “%5B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH ] string(3) “%5D”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH ( ※半角 string(3) “%28”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH ) ※半角 string(3) “%29”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH ( ※全角 string(9) “%EF%BC%88”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH ) ※全角 string(9) “%EF%BC%89”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH string(3) “%22”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH \ string(3) “%5C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH ; string(3) “%3B”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH : string(3) “%3A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH , string(3) “%2C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH / string(3) “%2F”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH < string(3) “%3C”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH > string(3) “%3E”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH sample@example.jp string(19) “sample%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH .sample@example.jp string(20) “.sample%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH sample.@example.jp string(20) “sample.%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH sam..ple@example.jp string(21) “sam..ple%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH test.sample@example.jp string(24) “test.sample%40example.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH myaddress+test2@gmail.com string(29) “myaddress%2Btest2%40gmail.com”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 10.0.0.0/8 string(12) “10.0.0.0%2F8”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 172.16.0.0/12 string(15) “172.16.0.0%2F12”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 192.168.0.0/16 string(16) “192.168.0.0%2F16”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 0.0.0.0/8 string(11) “0.0.0.0%2F8”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 169.254.0.0/16 string(16) “169.254.0.0%2F16”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 127.0.0.0/8 string(13) “127.0.0.0%2F8”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 240.0.0.0/4 string(13) “240.0.0.0%2F4”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 192.168.0.0:80 string(16) “192.168.0.0%3A80”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH :80 string(5) “%3A80”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH localhost string(9) “localhost”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “ABCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “FDCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(53) “FGCD%3AEF01%3A2345%3A6789%3AABCD%3AEF01%3A2345%3A6789”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH FG:DB8:0:0:8:800:200C:417A string(40) “FG%3ADB8%3A0%3A0%3A8%3A800%3A200C%3A417A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 2001:DB8:0:0:8:800:200C:417A string(42) “2001%3ADB8%3A0%3A0%3A8%3A800%3A200C%3A417A”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH 12:34:56:78:9a:bc string(27) “12%3A34%3A56%3A78%3A9a%3Abc”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH http://www.yahoo.co.jp string(28) “http%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH https://www.yahoo.co.jp string(29) “https%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH ssh://www.yahoo.co.jp string(27) “ssh%3A%2F%2Fwww.yahoo.co.jp”
FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH mailto:sample@example.jp string(28) “mailto%3Asample%40example.jp”

addslashes() を適用します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_MAGIC_QUOTES NULL string(0) “”
FILTER_SANITIZE_MAGIC_QUOTES (空) string(0) “”
FILTER_SANITIZE_MAGIC_QUOTES 0 string(1) “0”
FILTER_SANITIZE_MAGIC_QUOTES 1 string(1) “1”
FILTER_SANITIZE_MAGIC_QUOTES -1 string(2) “-1”
FILTER_SANITIZE_MAGIC_QUOTES 0.1 string(3) “0.1”
FILTER_SANITIZE_MAGIC_QUOTES -0.1 string(4) “-0.1”
FILTER_SANITIZE_MAGIC_QUOTES 10000 string(5) “10000”
FILTER_SANITIZE_MAGIC_QUOTES “10,000” string(6) “10,000”
FILTER_SANITIZE_MAGIC_QUOTES 01 string(1) “1”
FILTER_SANITIZE_MAGIC_QUOTES 0xabc string(4) “2748”
FILTER_SANITIZE_MAGIC_QUOTES “0xghi” string(5) “0xghi”
FILTER_SANITIZE_MAGIC_QUOTES true string(1) “1”
FILTER_SANITIZE_MAGIC_QUOTES false string(0) “”
FILTER_SANITIZE_MAGIC_QUOTES yes string(3) “yes”
FILTER_SANITIZE_MAGIC_QUOTES no string(2) “no”
FILTER_SANITIZE_MAGIC_QUOTES on string(2) “on”
FILTER_SANITIZE_MAGIC_QUOTES off string(3) “off”
FILTER_SANITIZE_MAGIC_QUOTES ABC string(3) “ABC”
FILTER_SANITIZE_MAGIC_QUOTES abc string(3) “abc”
FILTER_SANITIZE_MAGIC_QUOTES あいう string(9) “あいう”
FILTER_SANITIZE_MAGIC_QUOTES 漢字 string(6) “漢字”
FILTER_SANITIZE_MAGIC_QUOTES <div>test</div> string(15) ”

test

FILTER_SANITIZE_MAGIC_QUOTES ! string(1) “!”
FILTER_SANITIZE_MAGIC_QUOTES # string(1) “#”
FILTER_SANITIZE_MAGIC_QUOTES $ string(1) “$”
FILTER_SANITIZE_MAGIC_QUOTES % string(1) “%”
FILTER_SANITIZE_MAGIC_QUOTES & string(1) “&”
FILTER_SANITIZE_MAGIC_QUOTES string(2) “\'”
FILTER_SANITIZE_MAGIC_QUOTES * string(1) “*”
FILTER_SANITIZE_MAGIC_QUOTES + string(1) “+”
FILTER_SANITIZE_MAGIC_QUOTES string(1) “-“
FILTER_SANITIZE_MAGIC_QUOTES = string(1) “=”
FILTER_SANITIZE_MAGIC_QUOTES ? string(1) “?”
FILTER_SANITIZE_MAGIC_QUOTES ^ string(1) “^”
FILTER_SANITIZE_MAGIC_QUOTES _ string(1) “_”
FILTER_SANITIZE_MAGIC_QUOTES ` string(1) “`”
FILTER_SANITIZE_MAGIC_QUOTES { string(1) “{“
FILTER_SANITIZE_MAGIC_QUOTES | string(1) “|”
FILTER_SANITIZE_MAGIC_QUOTES } string(1) “}”
FILTER_SANITIZE_MAGIC_QUOTES ~ string(1) “~”
FILTER_SANITIZE_MAGIC_QUOTES @ string(1) “@”
FILTER_SANITIZE_MAGIC_QUOTES . string(1) “.”
FILTER_SANITIZE_MAGIC_QUOTES [ string(1) “[“
FILTER_SANITIZE_MAGIC_QUOTES ] string(1) “]”
FILTER_SANITIZE_MAGIC_QUOTES ( ※半角 string(1) “(“
FILTER_SANITIZE_MAGIC_QUOTES ) ※半角 string(1) “)”
FILTER_SANITIZE_MAGIC_QUOTES ( ※全角 string(3) “(”
FILTER_SANITIZE_MAGIC_QUOTES ) ※全角 string(3) “)”
FILTER_SANITIZE_MAGIC_QUOTES string(2) “\””
FILTER_SANITIZE_MAGIC_QUOTES \ string(2) “\\”
FILTER_SANITIZE_MAGIC_QUOTES ; string(1) “;”
FILTER_SANITIZE_MAGIC_QUOTES : string(1) “:”
FILTER_SANITIZE_MAGIC_QUOTES , string(1) “,”
FILTER_SANITIZE_MAGIC_QUOTES / string(1) “/”
FILTER_SANITIZE_MAGIC_QUOTES < string(1) “<“
FILTER_SANITIZE_MAGIC_QUOTES > string(1) “>”
FILTER_SANITIZE_MAGIC_QUOTES sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_MAGIC_QUOTES .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_MAGIC_QUOTES sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_MAGIC_QUOTES sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_MAGIC_QUOTES test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_MAGIC_QUOTES myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_MAGIC_QUOTES 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_MAGIC_QUOTES 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_MAGIC_QUOTES 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_MAGIC_QUOTES 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_MAGIC_QUOTES 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_MAGIC_QUOTES 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_MAGIC_QUOTES 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_MAGIC_QUOTES 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_MAGIC_QUOTES 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_MAGIC_QUOTES 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_MAGIC_QUOTES 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_MAGIC_QUOTES 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_MAGIC_QUOTES 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_MAGIC_QUOTES 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_MAGIC_QUOTES 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_MAGIC_QUOTES :80 string(3) “:80”
FILTER_SANITIZE_MAGIC_QUOTES localhost string(9) “localhost”
FILTER_SANITIZE_MAGIC_QUOTES ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_MAGIC_QUOTES FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_MAGIC_QUOTES FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_MAGIC_QUOTES FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_MAGIC_QUOTES 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_MAGIC_QUOTES 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_MAGIC_QUOTES http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_MAGIC_QUOTES https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_MAGIC_QUOTES ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_MAGIC_QUOTES mailto:sample@example.jp string(24) “mailto:sample@example.jp”

数字、+- および オプションで .,eE 以外のすべての文字を取り除きます。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_NUMBER_FLOAT NULL string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT (空) string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT 0 string(1) “0”
FILTER_SANITIZE_NUMBER_FLOAT 1 string(1) “1”
FILTER_SANITIZE_NUMBER_FLOAT -1 string(2) “-1”
FILTER_SANITIZE_NUMBER_FLOAT 0.1 string(2) “01”
FILTER_SANITIZE_NUMBER_FLOAT -0.1 string(3) “-01”
FILTER_SANITIZE_NUMBER_FLOAT 10000 string(5) “10000”
FILTER_SANITIZE_NUMBER_FLOAT “10,000” string(5) “10000”
FILTER_SANITIZE_NUMBER_FLOAT 01 string(1) “1”
FILTER_SANITIZE_NUMBER_FLOAT 0xabc string(4) “2748”
FILTER_SANITIZE_NUMBER_FLOAT “0xghi” string(1) “0”
FILTER_SANITIZE_NUMBER_FLOAT true string(1) “1”
FILTER_SANITIZE_NUMBER_FLOAT false string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT yes string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT no string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT on string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT off string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT ABC string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT abc string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT あいう string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT 漢字 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT <div>test</div> string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT ! string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT # string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT $ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT % string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT & string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT * string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT + string(1) “+”
FILTER_SANITIZE_NUMBER_FLOAT string(1) “-“
FILTER_SANITIZE_NUMBER_FLOAT = string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT ? string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT ^ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT _ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT ` string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT { string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT | string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT } string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT ~ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT @ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT . string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT [ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT ] string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT ( ※半角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT ) ※半角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT ( ※全角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT ) ※全角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT \ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT ; string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT : string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT , string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT / string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT < string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT > string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT sample@example.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT .sample@example.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT sample.@example.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT sam..ple@example.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT test.sample@example.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT myaddress+test2@gmail.com string(2) “+2”
FILTER_SANITIZE_NUMBER_FLOAT 10.0.0.0/8 string(6) “100008”
FILTER_SANITIZE_NUMBER_FLOAT 172.16.0.0/12 string(9) “172160012”
FILTER_SANITIZE_NUMBER_FLOAT 192.168.0.0/16 string(10) “1921680016”
FILTER_SANITIZE_NUMBER_FLOAT 0.0.0.0/8 string(5) “00008”
FILTER_SANITIZE_NUMBER_FLOAT 169.254.0.0/16 string(10) “1692540016”
FILTER_SANITIZE_NUMBER_FLOAT 127.0.0.0/8 string(7) “1270008”
FILTER_SANITIZE_NUMBER_FLOAT 240.0.0.0/4 string(7) “2400004”
FILTER_SANITIZE_NUMBER_FLOAT 10.0.0.0 string(5) “10000”
FILTER_SANITIZE_NUMBER_FLOAT 172.16.0.0 string(7) “1721600”
FILTER_SANITIZE_NUMBER_FLOAT 192.168.0.0 string(8) “19216800”
FILTER_SANITIZE_NUMBER_FLOAT 192.168.0.0:80 string(10) “1921680080”
FILTER_SANITIZE_NUMBER_FLOAT 0.0.0.0 string(4) “0000”
FILTER_SANITIZE_NUMBER_FLOAT 169.254.0.0 string(8) “16925400”
FILTER_SANITIZE_NUMBER_FLOAT 127.0.0.0 string(6) “127000”
FILTER_SANITIZE_NUMBER_FLOAT 240.0.0.0 string(6) “240000”
FILTER_SANITIZE_NUMBER_FLOAT :80 string(2) “80”
FILTER_SANITIZE_NUMBER_FLOAT localhost string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(20) “01234567890123456789”
FILTER_SANITIZE_NUMBER_FLOAT FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(20) “01234567890123456789”
FILTER_SANITIZE_NUMBER_FLOAT FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(20) “01234567890123456789”
FILTER_SANITIZE_NUMBER_FLOAT FG:DB8:0:0:8:800:200C:417A string(13) “8008800200417”
FILTER_SANITIZE_NUMBER_FLOAT 2001:DB8:0:0:8:800:200C:417A string(17) “20018008800200417”
FILTER_SANITIZE_NUMBER_FLOAT 12:34:56:78:9a:bc string(9) “123456789”
FILTER_SANITIZE_NUMBER_FLOAT http://www.yahoo.co.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT https://www.yahoo.co.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT ssh://www.yahoo.co.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT mailto:sample@example.jp string(0) “”

数字、+- および オプションで .,eE 以外のすべての文字を取り除きます。
フィルタフラグ: ピリオド (.) を数値の小数点として許可します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION NULL string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION (空) string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 0 string(1) “0”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 1 string(1) “1”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION -1 string(2) “-1”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 0.1 string(3) “0.1”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION -0.1 string(4) “-0.1”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 10000 string(5) “10000”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION “10,000” string(5) “10000”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 01 string(1) “1”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 0xabc string(4) “2748”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION “0xghi” string(1) “0”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION true string(1) “1”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION false string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION yes string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION no string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION on string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION off string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ABC string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION abc string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION あいう string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 漢字 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION <div>test</div> string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ! string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION # string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION $ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION % string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION & string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION * string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION + string(1) “+”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION string(1) “-“
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION = string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ? string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ^ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION _ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ` string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION { string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION | string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION } string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ~ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION @ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION . string(1) “.”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION [ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ] string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ( ※半角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ) ※半角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ( ※全角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ) ※全角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION \ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ; string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION : string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION , string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION / string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION < string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION > string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION sample@example.jp string(1) “.”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION .sample@example.jp string(2) “..”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION sample.@example.jp string(2) “..”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION sam..ple@example.jp string(3) “…”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION test.sample@example.jp string(2) “..”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION myaddress+test2@gmail.com string(3) “+2.”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 10.0.0.0/8 string(9) “10.0.0.08”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 172.16.0.0/12 string(12) “172.16.0.012”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 192.168.0.0/16 string(13) “192.168.0.016”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 0.0.0.0/8 string(8) “0.0.0.08”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 169.254.0.0/16 string(13) “169.254.0.016”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 127.0.0.0/8 string(10) “127.0.0.08”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 240.0.0.0/4 string(10) “240.0.0.04”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 192.168.0.0:80 string(13) “192.168.0.080”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION :80 string(2) “80”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION localhost string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(20) “01234567890123456789”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(20) “01234567890123456789”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(20) “01234567890123456789”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION FG:DB8:0:0:8:800:200C:417A string(13) “8008800200417”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 2001:DB8:0:0:8:800:200C:417A string(17) “20018008800200417”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION 12:34:56:78:9a:bc string(9) “123456789”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION http://www.yahoo.co.jp string(3) “…”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION https://www.yahoo.co.jp string(3) “…”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ssh://www.yahoo.co.jp string(3) “…”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION mailto:sample@example.jp string(1) “.”

数字、+- および オプションで .,eE 以外のすべての文字を取り除きます。
フィルタフラグ: カンマ (,) を数値の桁区切り文字として許可します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND NULL string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND (空) string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 0 string(1) “0”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 1 string(1) “1”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND -1 string(2) “-1”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 0.1 string(2) “01”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND -0.1 string(3) “-01”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 10000 string(5) “10000”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND “10,000” string(6) “10,000”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 01 string(1) “1”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 0xabc string(4) “2748”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND “0xghi” string(1) “0”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND true string(1) “1”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND false string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND yes string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND no string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND on string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND off string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ABC string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND abc string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND あいう string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 漢字 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND <div>test</div> string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ! string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND # string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND $ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND % string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND & string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND * string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND + string(1) “+”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND string(1) “-“
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND = string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ? string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ^ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND _ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ` string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND { string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND | string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND } string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ~ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND @ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND . string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND [ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ] string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ( ※半角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ) ※半角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ( ※全角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ) ※全角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND \ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ; string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND : string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND , string(1) “,”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND / string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND < string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND > string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND sample@example.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND .sample@example.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND sample.@example.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND sam..ple@example.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND test.sample@example.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND myaddress+test2@gmail.com string(2) “+2”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 10.0.0.0/8 string(6) “100008”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 172.16.0.0/12 string(9) “172160012”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 192.168.0.0/16 string(10) “1921680016”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 0.0.0.0/8 string(5) “00008”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 169.254.0.0/16 string(10) “1692540016”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 127.0.0.0/8 string(7) “1270008”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 240.0.0.0/4 string(7) “2400004”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 10.0.0.0 string(5) “10000”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 172.16.0.0 string(7) “1721600”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 192.168.0.0 string(8) “19216800”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 192.168.0.0:80 string(10) “1921680080”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 0.0.0.0 string(4) “0000”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 169.254.0.0 string(8) “16925400”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 127.0.0.0 string(6) “127000”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 240.0.0.0 string(6) “240000”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND :80 string(2) “80”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND localhost string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(20) “01234567890123456789”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(20) “01234567890123456789”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(20) “01234567890123456789”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND FG:DB8:0:0:8:800:200C:417A string(13) “8008800200417”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 2001:DB8:0:0:8:800:200C:417A string(17) “20018008800200417”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND 12:34:56:78:9a:bc string(9) “123456789”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND http://www.yahoo.co.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND https://www.yahoo.co.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND ssh://www.yahoo.co.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND mailto:sample@example.jp string(0) “”

数字、+- および オプションで .,eE 以外のすべての文字を取り除きます。
フィルタフラグ: e あるいは E を、 科学記法の数値として許可します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC NULL string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC (空) string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 0 string(1) “0”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 1 string(1) “1”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC -1 string(2) “-1”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 0.1 string(2) “01”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC -0.1 string(3) “-01”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 10000 string(5) “10000”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC “10,000” string(5) “10000”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 01 string(1) “1”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 0xabc string(4) “2748”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC “0xghi” string(1) “0”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC true string(1) “1”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC false string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC yes string(1) “e”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC no string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC on string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC off string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC ABC string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC abc string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC あいう string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 漢字 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC <div>test</div> string(1) “e”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC ! string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC # string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC $ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC % string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC & string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC * string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC + string(1) “+”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC string(1) “-“
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC = string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC ? string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC ^ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC _ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC ` string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC { string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC | string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC } string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC ~ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC @ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC . string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC [ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC ] string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC ( ※半角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC ) ※半角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC ( ※全角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC ) ※全角 string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC \ string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC ; string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC : string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC , string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC / string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC < string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC > string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC sample@example.jp string(3) “eee”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC .sample@example.jp string(3) “eee”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC sample.@example.jp string(3) “eee”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC sam..ple@example.jp string(3) “eee”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC test.sample@example.jp string(4) “eeee”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC myaddress+test2@gmail.com string(4) “e+e2”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 10.0.0.0/8 string(6) “100008”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 172.16.0.0/12 string(9) “172160012”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 192.168.0.0/16 string(10) “1921680016”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 0.0.0.0/8 string(5) “00008”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 169.254.0.0/16 string(10) “1692540016”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 127.0.0.0/8 string(7) “1270008”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 240.0.0.0/4 string(7) “2400004”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 10.0.0.0 string(5) “10000”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 172.16.0.0 string(7) “1721600”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 192.168.0.0 string(8) “19216800”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 192.168.0.0:80 string(10) “1921680080”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 0.0.0.0 string(4) “0000”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 169.254.0.0 string(8) “16925400”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 127.0.0.0 string(6) “127000”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 240.0.0.0 string(6) “240000”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC :80 string(2) “80”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC localhost string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(22) “E0123456789E0123456789”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(22) “E0123456789E0123456789”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(22) “E0123456789E0123456789”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC FG:DB8:0:0:8:800:200C:417A string(13) “8008800200417”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 2001:DB8:0:0:8:800:200C:417A string(17) “20018008800200417”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC 12:34:56:78:9a:bc string(9) “123456789”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC http://www.yahoo.co.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC https://www.yahoo.co.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC ssh://www.yahoo.co.jp string(0) “”
FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC mailto:sample@example.jp string(3) “eee”

数字、プラス記号、マイナス記号 以外のすべての文字を取り除きます。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_NUMBER_INT NULL string(0) “”
FILTER_SANITIZE_NUMBER_INT (空) string(0) “”
FILTER_SANITIZE_NUMBER_INT 0 string(1) “0”
FILTER_SANITIZE_NUMBER_INT 1 string(1) “1”
FILTER_SANITIZE_NUMBER_INT -1 string(2) “-1”
FILTER_SANITIZE_NUMBER_INT 0.1 string(2) “01”
FILTER_SANITIZE_NUMBER_INT -0.1 string(3) “-01”
FILTER_SANITIZE_NUMBER_INT 10000 string(5) “10000”
FILTER_SANITIZE_NUMBER_INT “10,000” string(5) “10000”
FILTER_SANITIZE_NUMBER_INT 01 string(1) “1”
FILTER_SANITIZE_NUMBER_INT 0xabc string(4) “2748”
FILTER_SANITIZE_NUMBER_INT “0xghi” string(1) “0”
FILTER_SANITIZE_NUMBER_INT true string(1) “1”
FILTER_SANITIZE_NUMBER_INT false string(0) “”
FILTER_SANITIZE_NUMBER_INT yes string(0) “”
FILTER_SANITIZE_NUMBER_INT no string(0) “”
FILTER_SANITIZE_NUMBER_INT on string(0) “”
FILTER_SANITIZE_NUMBER_INT off string(0) “”
FILTER_SANITIZE_NUMBER_INT ABC string(0) “”
FILTER_SANITIZE_NUMBER_INT abc string(0) “”
FILTER_SANITIZE_NUMBER_INT あいう string(0) “”
FILTER_SANITIZE_NUMBER_INT 漢字 string(0) “”
FILTER_SANITIZE_NUMBER_INT <div>test</div> string(0) “”
FILTER_SANITIZE_NUMBER_INT ! string(0) “”
FILTER_SANITIZE_NUMBER_INT # string(0) “”
FILTER_SANITIZE_NUMBER_INT $ string(0) “”
FILTER_SANITIZE_NUMBER_INT % string(0) “”
FILTER_SANITIZE_NUMBER_INT & string(0) “”
FILTER_SANITIZE_NUMBER_INT string(0) “”
FILTER_SANITIZE_NUMBER_INT * string(0) “”
FILTER_SANITIZE_NUMBER_INT + string(1) “+”
FILTER_SANITIZE_NUMBER_INT string(1) “-“
FILTER_SANITIZE_NUMBER_INT = string(0) “”
FILTER_SANITIZE_NUMBER_INT ? string(0) “”
FILTER_SANITIZE_NUMBER_INT ^ string(0) “”
FILTER_SANITIZE_NUMBER_INT _ string(0) “”
FILTER_SANITIZE_NUMBER_INT ` string(0) “”
FILTER_SANITIZE_NUMBER_INT { string(0) “”
FILTER_SANITIZE_NUMBER_INT | string(0) “”
FILTER_SANITIZE_NUMBER_INT } string(0) “”
FILTER_SANITIZE_NUMBER_INT ~ string(0) “”
FILTER_SANITIZE_NUMBER_INT @ string(0) “”
FILTER_SANITIZE_NUMBER_INT . string(0) “”
FILTER_SANITIZE_NUMBER_INT [ string(0) “”
FILTER_SANITIZE_NUMBER_INT ] string(0) “”
FILTER_SANITIZE_NUMBER_INT ( ※半角 string(0) “”
FILTER_SANITIZE_NUMBER_INT ) ※半角 string(0) “”
FILTER_SANITIZE_NUMBER_INT ( ※全角 string(0) “”
FILTER_SANITIZE_NUMBER_INT ) ※全角 string(0) “”
FILTER_SANITIZE_NUMBER_INT string(0) “”
FILTER_SANITIZE_NUMBER_INT \ string(0) “”
FILTER_SANITIZE_NUMBER_INT ; string(0) “”
FILTER_SANITIZE_NUMBER_INT : string(0) “”
FILTER_SANITIZE_NUMBER_INT , string(0) “”
FILTER_SANITIZE_NUMBER_INT / string(0) “”
FILTER_SANITIZE_NUMBER_INT < string(0) “”
FILTER_SANITIZE_NUMBER_INT > string(0) “”
FILTER_SANITIZE_NUMBER_INT sample@example.jp string(0) “”
FILTER_SANITIZE_NUMBER_INT .sample@example.jp string(0) “”
FILTER_SANITIZE_NUMBER_INT sample.@example.jp string(0) “”
FILTER_SANITIZE_NUMBER_INT sam..ple@example.jp string(0) “”
FILTER_SANITIZE_NUMBER_INT test.sample@example.jp string(0) “”
FILTER_SANITIZE_NUMBER_INT myaddress+test2@gmail.com string(2) “+2”
FILTER_SANITIZE_NUMBER_INT 10.0.0.0/8 string(6) “100008”
FILTER_SANITIZE_NUMBER_INT 172.16.0.0/12 string(9) “172160012”
FILTER_SANITIZE_NUMBER_INT 192.168.0.0/16 string(10) “1921680016”
FILTER_SANITIZE_NUMBER_INT 0.0.0.0/8 string(5) “00008”
FILTER_SANITIZE_NUMBER_INT 169.254.0.0/16 string(10) “1692540016”
FILTER_SANITIZE_NUMBER_INT 127.0.0.0/8 string(7) “1270008”
FILTER_SANITIZE_NUMBER_INT 240.0.0.0/4 string(7) “2400004”
FILTER_SANITIZE_NUMBER_INT 10.0.0.0 string(5) “10000”
FILTER_SANITIZE_NUMBER_INT 172.16.0.0 string(7) “1721600”
FILTER_SANITIZE_NUMBER_INT 192.168.0.0 string(8) “19216800”
FILTER_SANITIZE_NUMBER_INT 192.168.0.0:80 string(10) “1921680080”
FILTER_SANITIZE_NUMBER_INT 0.0.0.0 string(4) “0000”
FILTER_SANITIZE_NUMBER_INT 169.254.0.0 string(8) “16925400”
FILTER_SANITIZE_NUMBER_INT 127.0.0.0 string(6) “127000”
FILTER_SANITIZE_NUMBER_INT 240.0.0.0 string(6) “240000”
FILTER_SANITIZE_NUMBER_INT :80 string(2) “80”
FILTER_SANITIZE_NUMBER_INT localhost string(0) “”
FILTER_SANITIZE_NUMBER_INT ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(20) “01234567890123456789”
FILTER_SANITIZE_NUMBER_INT FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(20) “01234567890123456789”
FILTER_SANITIZE_NUMBER_INT FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(20) “01234567890123456789”
FILTER_SANITIZE_NUMBER_INT FG:DB8:0:0:8:800:200C:417A string(13) “8008800200417”
FILTER_SANITIZE_NUMBER_INT 2001:DB8:0:0:8:800:200C:417A string(17) “20018008800200417”
FILTER_SANITIZE_NUMBER_INT 12:34:56:78:9a:bc string(9) “123456789”
FILTER_SANITIZE_NUMBER_INT http://www.yahoo.co.jp string(0) “”
FILTER_SANITIZE_NUMBER_INT https://www.yahoo.co.jp string(0) “”
FILTER_SANITIZE_NUMBER_INT ssh://www.yahoo.co.jp string(0) “”
FILTER_SANITIZE_NUMBER_INT mailto:sample@example.jp string(0) “”

‘”<>& および ASCII 値が 32 未満の文字を HTML エスケープします。オプションで、 特殊文字を取り除いたりエンコードしたりします。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_SPECIAL_CHARS NULL string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS (空) string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS 0 string(1) “0”
FILTER_SANITIZE_SPECIAL_CHARS 1 string(1) “1”
FILTER_SANITIZE_SPECIAL_CHARS -1 string(2) “-1”
FILTER_SANITIZE_SPECIAL_CHARS 0.1 string(3) “0.1”
FILTER_SANITIZE_SPECIAL_CHARS -0.1 string(4) “-0.1”
FILTER_SANITIZE_SPECIAL_CHARS 10000 string(5) “10000”
FILTER_SANITIZE_SPECIAL_CHARS “10,000” string(6) “10,000”
FILTER_SANITIZE_SPECIAL_CHARS 01 string(1) “1”
FILTER_SANITIZE_SPECIAL_CHARS 0xabc string(4) “2748”
FILTER_SANITIZE_SPECIAL_CHARS “0xghi” string(5) “0xghi”
FILTER_SANITIZE_SPECIAL_CHARS true string(1) “1”
FILTER_SANITIZE_SPECIAL_CHARS false string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS yes string(3) “yes”
FILTER_SANITIZE_SPECIAL_CHARS no string(2) “no”
FILTER_SANITIZE_SPECIAL_CHARS on string(2) “on”
FILTER_SANITIZE_SPECIAL_CHARS off string(3) “off”
FILTER_SANITIZE_SPECIAL_CHARS ABC string(3) “ABC”
FILTER_SANITIZE_SPECIAL_CHARS abc string(3) “abc”
FILTER_SANITIZE_SPECIAL_CHARS あいう string(9) “あいう”
FILTER_SANITIZE_SPECIAL_CHARS 漢字 string(6) “漢字”
FILTER_SANITIZE_SPECIAL_CHARS <div>test</div> string(31) “<div>test</div>”
FILTER_SANITIZE_SPECIAL_CHARS ! string(1) “!”
FILTER_SANITIZE_SPECIAL_CHARS # string(1) “#”
FILTER_SANITIZE_SPECIAL_CHARS $ string(1) “$”
FILTER_SANITIZE_SPECIAL_CHARS % string(1) “%”
FILTER_SANITIZE_SPECIAL_CHARS & string(5) “&”
FILTER_SANITIZE_SPECIAL_CHARS string(5) “‘”
FILTER_SANITIZE_SPECIAL_CHARS * string(1) “*”
FILTER_SANITIZE_SPECIAL_CHARS + string(1) “+”
FILTER_SANITIZE_SPECIAL_CHARS string(1) “-“
FILTER_SANITIZE_SPECIAL_CHARS = string(1) “=”
FILTER_SANITIZE_SPECIAL_CHARS ? string(1) “?”
FILTER_SANITIZE_SPECIAL_CHARS ^ string(1) “^”
FILTER_SANITIZE_SPECIAL_CHARS _ string(1) “_”
FILTER_SANITIZE_SPECIAL_CHARS ` string(1) “`”
FILTER_SANITIZE_SPECIAL_CHARS { string(1) “{“
FILTER_SANITIZE_SPECIAL_CHARS | string(1) “|”
FILTER_SANITIZE_SPECIAL_CHARS } string(1) “}”
FILTER_SANITIZE_SPECIAL_CHARS ~ string(1) “~”
FILTER_SANITIZE_SPECIAL_CHARS @ string(1) “@”
FILTER_SANITIZE_SPECIAL_CHARS . string(1) “.”
FILTER_SANITIZE_SPECIAL_CHARS [ string(1) “[“
FILTER_SANITIZE_SPECIAL_CHARS ] string(1) “]”
FILTER_SANITIZE_SPECIAL_CHARS ( ※半角 string(1) “(“
FILTER_SANITIZE_SPECIAL_CHARS ) ※半角 string(1) “)”
FILTER_SANITIZE_SPECIAL_CHARS ( ※全角 string(3) “(”
FILTER_SANITIZE_SPECIAL_CHARS ) ※全角 string(3) “)”
FILTER_SANITIZE_SPECIAL_CHARS string(5) “””
FILTER_SANITIZE_SPECIAL_CHARS \ string(1) “\”
FILTER_SANITIZE_SPECIAL_CHARS ; string(1) “;”
FILTER_SANITIZE_SPECIAL_CHARS : string(1) “:”
FILTER_SANITIZE_SPECIAL_CHARS , string(1) “,”
FILTER_SANITIZE_SPECIAL_CHARS / string(1) “/”
FILTER_SANITIZE_SPECIAL_CHARS < string(5) “<“
FILTER_SANITIZE_SPECIAL_CHARS > string(5) “>”
FILTER_SANITIZE_SPECIAL_CHARS sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_SPECIAL_CHARS 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_SPECIAL_CHARS 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_SPECIAL_CHARS 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_SPECIAL_CHARS 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_SPECIAL_CHARS 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_SPECIAL_CHARS 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_SPECIAL_CHARS 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_SPECIAL_CHARS 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_SPECIAL_CHARS 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_SPECIAL_CHARS 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_SPECIAL_CHARS 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_SPECIAL_CHARS 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS :80 string(3) “:80”
FILTER_SANITIZE_SPECIAL_CHARS localhost string(9) “localhost”
FILTER_SANITIZE_SPECIAL_CHARS ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_SPECIAL_CHARS FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_SPECIAL_CHARS FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_SPECIAL_CHARS FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_SPECIAL_CHARS 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_SPECIAL_CHARS 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_SPECIAL_CHARS http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_SPECIAL_CHARS https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_SPECIAL_CHARS ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_SPECIAL_CHARS mailto:sample@example.jp string(24) “mailto:sample@example.jp”

‘”<>& および ASCII 値が 32 未満の文字を HTML エスケープします。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: コードが 32 未満の文字を除去します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW NULL string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW (空) string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 0 string(1) “0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 1 string(1) “1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW -1 string(2) “-1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 0.1 string(3) “0.1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW -0.1 string(4) “-0.1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 10000 string(5) “10000”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW “10,000” string(6) “10,000”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 01 string(1) “1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 0xabc string(4) “2748”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW “0xghi” string(5) “0xghi”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW true string(1) “1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW false string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW yes string(3) “yes”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW no string(2) “no”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW on string(2) “on”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW off string(3) “off”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW ABC string(3) “ABC”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW abc string(3) “abc”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW あいう string(9) “あいう”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 漢字 string(6) “漢字”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW <div>test</div> string(31) “<div>test</div>”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW ! string(1) “!”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW # string(1) “#”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW $ string(1) “$”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW % string(1) “%”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW & string(5) “&”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW string(5) “‘”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW * string(1) “*”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW + string(1) “+”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW string(1) “-“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW = string(1) “=”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW ? string(1) “?”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW ^ string(1) “^”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW _ string(1) “_”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW ` string(1) “`”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW { string(1) “{“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW | string(1) “|”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW } string(1) “}”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW ~ string(1) “~”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW @ string(1) “@”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW . string(1) “.”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW [ string(1) “[“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW ] string(1) “]”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW ( ※半角 string(1) “(“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW ) ※半角 string(1) “)”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW ( ※全角 string(3) “(”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW ) ※全角 string(3) “)”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW string(5) “””
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW \ string(1) “\”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW ; string(1) “;”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW : string(1) “:”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW , string(1) “,”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW / string(1) “/”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW < string(5) “<“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW > string(5) “>”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW :80 string(3) “:80”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW localhost string(9) “localhost”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW mailto:sample@example.jp string(24) “mailto:sample@example.jp”

‘”<>& および ASCII 値が 32 未満の文字を HTML エスケープします。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: コードが 127 より大きい文字を除去します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH NULL string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH (空) string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 0 string(1) “0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 1 string(1) “1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH -1 string(2) “-1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 0.1 string(3) “0.1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH -0.1 string(4) “-0.1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 10000 string(5) “10000”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH “10,000” string(6) “10,000”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 01 string(1) “1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 0xabc string(4) “2748”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH “0xghi” string(5) “0xghi”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH true string(1) “1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH false string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH yes string(3) “yes”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH no string(2) “no”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH on string(2) “on”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH off string(3) “off”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH ABC string(3) “ABC”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH abc string(3) “abc”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH あいう string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 漢字 string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH <div>test</div> string(31) “<div>test</div>”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH ! string(1) “!”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH # string(1) “#”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH $ string(1) “$”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH % string(1) “%”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH & string(5) “&”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH string(5) “‘”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH * string(1) “*”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH + string(1) “+”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH string(1) “-“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH = string(1) “=”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH ? string(1) “?”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH ^ string(1) “^”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH _ string(1) “_”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH ` string(1) “`”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH { string(1) “{“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH | string(1) “|”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH } string(1) “}”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH ~ string(1) “~”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH @ string(1) “@”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH . string(1) “.”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH [ string(1) “[“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH ] string(1) “]”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH ( ※半角 string(1) “(“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH ) ※半角 string(1) “)”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH ( ※全角 string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH ) ※全角 string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH string(5) “””
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH \ string(1) “\”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH ; string(1) “;”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH : string(1) “:”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH , string(1) “,”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH / string(1) “/”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH < string(5) “<“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH > string(5) “>”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH :80 string(3) “:80”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH localhost string(9) “localhost”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH mailto:sample@example.jp string(24) “mailto:sample@example.jp”

‘”<>& および ASCII 値が 32 未満の文字を HTML エスケープします。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: バックティック文字を除去します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK NULL string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK (空) string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 0 string(1) “0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 1 string(1) “1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK -1 string(2) “-1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 0.1 string(3) “0.1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK -0.1 string(4) “-0.1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 10000 string(5) “10000”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK “10,000” string(6) “10,000”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 01 string(1) “1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 0xabc string(4) “2748”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK “0xghi” string(5) “0xghi”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK true string(1) “1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK false string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK yes string(3) “yes”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK no string(2) “no”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK on string(2) “on”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK off string(3) “off”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK ABC string(3) “ABC”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK abc string(3) “abc”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK あいう string(9) “あいう”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 漢字 string(6) “漢字”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK <div>test</div> string(31) “<div>test</div>”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK ! string(1) “!”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK # string(1) “#”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK $ string(1) “$”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK % string(1) “%”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK & string(5) “&”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK string(5) “‘”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK * string(1) “*”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK + string(1) “+”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK string(1) “-“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK = string(1) “=”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK ? string(1) “?”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK ^ string(1) “^”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK _ string(1) “_”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK ` string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK { string(1) “{“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK | string(1) “|”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK } string(1) “}”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK ~ string(1) “~”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK @ string(1) “@”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK . string(1) “.”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK [ string(1) “[“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK ] string(1) “]”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK ( ※半角 string(1) “(“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK ) ※半角 string(1) “)”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK ( ※全角 string(3) “(”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK ) ※全角 string(3) “)”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK string(5) “””
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK \ string(1) “\”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK ; string(1) “;”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK : string(1) “:”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK , string(1) “,”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK / string(1) “/”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK < string(5) “<“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK > string(5) “>”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK :80 string(3) “:80”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK localhost string(9) “localhost”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK mailto:sample@example.jp string(24) “mailto:sample@example.jp”

‘”<>& および ASCII 値が 32 未満の文字を HTML エスケープします。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: コードが 127 より大きいすべての文字をエンコードします。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH NULL string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH (空) string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 0 string(1) “0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 1 string(1) “1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH -1 string(2) “-1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 0.1 string(3) “0.1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH -0.1 string(4) “-0.1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 10000 string(5) “10000”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH “10,000” string(6) “10,000”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 01 string(1) “1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 0xabc string(4) “2748”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH “0xghi” string(5) “0xghi”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH true string(1) “1”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH false string(0) “”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH yes string(3) “yes”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH no string(2) “no”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH on string(2) “on”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH off string(3) “off”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH ABC string(3) “ABC”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH abc string(3) “abc”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH あいう string(54) “ã‚ã„㆔
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 漢字 string(36) “漢字”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH <div>test</div> string(31) “<div>test</div>”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH ! string(1) “!”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH # string(1) “#”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH $ string(1) “$”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH % string(1) “%”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH & string(5) “&”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH string(5) “‘”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH * string(1) “*”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH + string(1) “+”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH string(1) “-“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH = string(1) “=”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH ? string(1) “?”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH ^ string(1) “^”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH _ string(1) “_”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH ` string(1) “`”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH { string(1) “{“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH | string(1) “|”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH } string(1) “}”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH ~ string(1) “~”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH @ string(1) “@”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH . string(1) “.”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH [ string(1) “[“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH ] string(1) “]”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH ( ※半角 string(1) “(“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH ) ※半角 string(1) “)”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH ( ※全角 string(18) “(”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH ) ※全角 string(18) “)”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH string(5) “””
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH \ string(1) “\”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH ; string(1) “;”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH : string(1) “:”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH , string(1) “,”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH / string(1) “/”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH < string(5) “<“
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH > string(5) “>”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH :80 string(3) “:80”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH localhost string(9) “localhost”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH mailto:sample@example.jp string(24) “mailto:sample@example.jp”

htmlspecialchars() に ENT_QUOTES を指定してコールするのと同じです。 クォートのエンコードを無効にするには FILTER_FLAG_NO_ENCODE_QUOTES を設定します。 htmlspecialchars() と同様、このフィルタは default_charset に対応しています。 現在の文字セットで無効な文字となるバイトシーケンスが検出されると文字列全体を拒否し、 結果は長さ 0 の文字列となります。 このフィルタをデフォルトのフィルタとして使う場合は、以下の警告を参考にして デフォルトのフラグを 0 に設定しましょう。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_FULL_SPECIAL_CHARS NULL string(0) “”
FILTER_SANITIZE_FULL_SPECIAL_CHARS (空) string(0) “”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 0 string(1) “0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 1 string(1) “1”
FILTER_SANITIZE_FULL_SPECIAL_CHARS -1 string(2) “-1”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 0.1 string(3) “0.1”
FILTER_SANITIZE_FULL_SPECIAL_CHARS -0.1 string(4) “-0.1”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 10000 string(5) “10000”
FILTER_SANITIZE_FULL_SPECIAL_CHARS “10,000” string(6) “10,000”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 01 string(1) “1”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 0xabc string(4) “2748”
FILTER_SANITIZE_FULL_SPECIAL_CHARS “0xghi” string(5) “0xghi”
FILTER_SANITIZE_FULL_SPECIAL_CHARS true string(1) “1”
FILTER_SANITIZE_FULL_SPECIAL_CHARS false string(0) “”
FILTER_SANITIZE_FULL_SPECIAL_CHARS yes string(3) “yes”
FILTER_SANITIZE_FULL_SPECIAL_CHARS no string(2) “no”
FILTER_SANITIZE_FULL_SPECIAL_CHARS on string(2) “on”
FILTER_SANITIZE_FULL_SPECIAL_CHARS off string(3) “off”
FILTER_SANITIZE_FULL_SPECIAL_CHARS ABC string(3) “ABC”
FILTER_SANITIZE_FULL_SPECIAL_CHARS abc string(3) “abc”
FILTER_SANITIZE_FULL_SPECIAL_CHARS あいう string(9) “あいう”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 漢字 string(6) “漢字”
FILTER_SANITIZE_FULL_SPECIAL_CHARS <div>test</div> string(27) “<div>test</div>”
FILTER_SANITIZE_FULL_SPECIAL_CHARS ! string(1) “!”
FILTER_SANITIZE_FULL_SPECIAL_CHARS # string(1) “#”
FILTER_SANITIZE_FULL_SPECIAL_CHARS $ string(1) “$”
FILTER_SANITIZE_FULL_SPECIAL_CHARS % string(1) “%”
FILTER_SANITIZE_FULL_SPECIAL_CHARS & string(5) “&”
FILTER_SANITIZE_FULL_SPECIAL_CHARS string(6) “‘”
FILTER_SANITIZE_FULL_SPECIAL_CHARS * string(1) “*”
FILTER_SANITIZE_FULL_SPECIAL_CHARS + string(1) “+”
FILTER_SANITIZE_FULL_SPECIAL_CHARS string(1) “-“
FILTER_SANITIZE_FULL_SPECIAL_CHARS = string(1) “=”
FILTER_SANITIZE_FULL_SPECIAL_CHARS ? string(1) “?”
FILTER_SANITIZE_FULL_SPECIAL_CHARS ^ string(1) “^”
FILTER_SANITIZE_FULL_SPECIAL_CHARS _ string(1) “_”
FILTER_SANITIZE_FULL_SPECIAL_CHARS ` string(1) “`”
FILTER_SANITIZE_FULL_SPECIAL_CHARS { string(1) “{“
FILTER_SANITIZE_FULL_SPECIAL_CHARS | string(1) “|”
FILTER_SANITIZE_FULL_SPECIAL_CHARS } string(1) “}”
FILTER_SANITIZE_FULL_SPECIAL_CHARS ~ string(1) “~”
FILTER_SANITIZE_FULL_SPECIAL_CHARS @ string(1) “@”
FILTER_SANITIZE_FULL_SPECIAL_CHARS . string(1) “.”
FILTER_SANITIZE_FULL_SPECIAL_CHARS [ string(1) “[“
FILTER_SANITIZE_FULL_SPECIAL_CHARS ] string(1) “]”
FILTER_SANITIZE_FULL_SPECIAL_CHARS ( ※半角 string(1) “(“
FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ※半角 string(1) “)”
FILTER_SANITIZE_FULL_SPECIAL_CHARS ( ※全角 string(3) “(”
FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ※全角 string(3) “)”
FILTER_SANITIZE_FULL_SPECIAL_CHARS string(6) “””
FILTER_SANITIZE_FULL_SPECIAL_CHARS \ string(1) “\”
FILTER_SANITIZE_FULL_SPECIAL_CHARS ; string(1) “;”
FILTER_SANITIZE_FULL_SPECIAL_CHARS : string(1) “:”
FILTER_SANITIZE_FULL_SPECIAL_CHARS , string(1) “,”
FILTER_SANITIZE_FULL_SPECIAL_CHARS / string(1) “/”
FILTER_SANITIZE_FULL_SPECIAL_CHARS < string(4) “<“
FILTER_SANITIZE_FULL_SPECIAL_CHARS > string(4) “>”
FILTER_SANITIZE_FULL_SPECIAL_CHARS sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS :80 string(3) “:80”
FILTER_SANITIZE_FULL_SPECIAL_CHARS localhost string(9) “localhost”
FILTER_SANITIZE_FULL_SPECIAL_CHARS ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_FULL_SPECIAL_CHARS FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_FULL_SPECIAL_CHARS FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_FULL_SPECIAL_CHARS FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_FULL_SPECIAL_CHARS 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_FULL_SPECIAL_CHARS http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS mailto:sample@example.jp string(24) “mailto:sample@example.jp”

htmlspecialchars() に ENT_QUOTES を指定してコールするのと同じです。 クォートのエンコードを無効にするには FILTER_FLAG_NO_ENCODE_QUOTES を設定します。 htmlspecialchars() と同様、このフィルタは default_charset に対応しています。 現在の文字セットで無効な文字となるバイトシーケンスが検出されると文字列全体を拒否し、 結果は長さ 0 の文字列となります。 このフィルタをデフォルトのフィルタとして使う場合は、以下の警告を参考にして デフォルトのフラグを 0 に設定しましょう。
フィルタフラグ: このフラグを指定すると、シングルクォート (‘) およびダブルクォート (“) をエンコードしません。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES NULL string(0) “”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES (空) string(0) “”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 0 string(1) “0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 1 string(1) “1”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES -1 string(2) “-1”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 0.1 string(3) “0.1”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES -0.1 string(4) “-0.1”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 10000 string(5) “10000”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES “10,000” string(6) “10,000”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 01 string(1) “1”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 0xabc string(4) “2748”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES “0xghi” string(5) “0xghi”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES true string(1) “1”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES false string(0) “”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES yes string(3) “yes”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES no string(2) “no”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES on string(2) “on”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES off string(3) “off”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES ABC string(3) “ABC”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES abc string(3) “abc”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES あいう string(9) “あいう”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 漢字 string(6) “漢字”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES <div>test</div> string(27) “<div>test</div>”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES ! string(1) “!”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES # string(1) “#”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES $ string(1) “$”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES % string(1) “%”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES & string(5) “&”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES string(1) “‘”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES * string(1) “*”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES + string(1) “+”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES string(1) “-“
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES = string(1) “=”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES ? string(1) “?”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES ^ string(1) “^”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES _ string(1) “_”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES ` string(1) “`”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES { string(1) “{“
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES | string(1) “|”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES } string(1) “}”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES ~ string(1) “~”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES @ string(1) “@”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES . string(1) “.”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES [ string(1) “[“
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES ] string(1) “]”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES ( ※半角 string(1) “(“
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES ) ※半角 string(1) “)”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES ( ※全角 string(3) “(”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES ) ※全角 string(3) “)”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES string(1) “””
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES \ string(1) “\”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES ; string(1) “;”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES : string(1) “:”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES , string(1) “,”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES / string(1) “/”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES < string(4) “<“
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES > string(4) “>”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES :80 string(3) “:80”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES localhost string(9) “localhost”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES mailto:sample@example.jp string(24) “mailto:sample@example.jp”

タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_STRING NULL string(0) “”
FILTER_SANITIZE_STRING (空) string(0) “”
FILTER_SANITIZE_STRING 0 string(1) “0”
FILTER_SANITIZE_STRING 1 string(1) “1”
FILTER_SANITIZE_STRING -1 string(2) “-1”
FILTER_SANITIZE_STRING 0.1 string(3) “0.1”
FILTER_SANITIZE_STRING -0.1 string(4) “-0.1”
FILTER_SANITIZE_STRING 10000 string(5) “10000”
FILTER_SANITIZE_STRING “10,000” string(6) “10,000”
FILTER_SANITIZE_STRING 01 string(1) “1”
FILTER_SANITIZE_STRING 0xabc string(4) “2748”
FILTER_SANITIZE_STRING “0xghi” string(5) “0xghi”
FILTER_SANITIZE_STRING true string(1) “1”
FILTER_SANITIZE_STRING false string(0) “”
FILTER_SANITIZE_STRING yes string(3) “yes”
FILTER_SANITIZE_STRING no string(2) “no”
FILTER_SANITIZE_STRING on string(2) “on”
FILTER_SANITIZE_STRING off string(3) “off”
FILTER_SANITIZE_STRING ABC string(3) “ABC”
FILTER_SANITIZE_STRING abc string(3) “abc”
FILTER_SANITIZE_STRING あいう string(9) “あいう”
FILTER_SANITIZE_STRING 漢字 string(6) “漢字”
FILTER_SANITIZE_STRING <div>test</div> string(4) “test”
FILTER_SANITIZE_STRING ! string(1) “!”
FILTER_SANITIZE_STRING # string(1) “#”
FILTER_SANITIZE_STRING $ string(1) “$”
FILTER_SANITIZE_STRING % string(1) “%”
FILTER_SANITIZE_STRING & string(1) “&”
FILTER_SANITIZE_STRING string(5) “‘”
FILTER_SANITIZE_STRING * string(1) “*”
FILTER_SANITIZE_STRING + string(1) “+”
FILTER_SANITIZE_STRING string(1) “-“
FILTER_SANITIZE_STRING = string(1) “=”
FILTER_SANITIZE_STRING ? string(1) “?”
FILTER_SANITIZE_STRING ^ string(1) “^”
FILTER_SANITIZE_STRING _ string(1) “_”
FILTER_SANITIZE_STRING ` string(1) “`”
FILTER_SANITIZE_STRING { string(1) “{“
FILTER_SANITIZE_STRING | string(1) “|”
FILTER_SANITIZE_STRING } string(1) “}”
FILTER_SANITIZE_STRING ~ string(1) “~”
FILTER_SANITIZE_STRING @ string(1) “@”
FILTER_SANITIZE_STRING . string(1) “.”
FILTER_SANITIZE_STRING [ string(1) “[“
FILTER_SANITIZE_STRING ] string(1) “]”
FILTER_SANITIZE_STRING ( ※半角 string(1) “(“
FILTER_SANITIZE_STRING ) ※半角 string(1) “)”
FILTER_SANITIZE_STRING ( ※全角 string(3) “(”
FILTER_SANITIZE_STRING ) ※全角 string(3) “)”
FILTER_SANITIZE_STRING string(5) “””
FILTER_SANITIZE_STRING \ string(1) “\”
FILTER_SANITIZE_STRING ; string(1) “;”
FILTER_SANITIZE_STRING : string(1) “:”
FILTER_SANITIZE_STRING , string(1) “,”
FILTER_SANITIZE_STRING / string(1) “/”
FILTER_SANITIZE_STRING < string(0) “”
FILTER_SANITIZE_STRING > string(1) “>”
FILTER_SANITIZE_STRING sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_STRING .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_STRING sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_STRING sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_STRING test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_STRING myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_STRING 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_STRING 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_STRING 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_STRING 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_STRING 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_STRING 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_STRING 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_STRING 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_STRING 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_STRING 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_STRING 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_STRING 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_STRING 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_STRING 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_STRING 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_STRING :80 string(3) “:80”
FILTER_SANITIZE_STRING localhost string(9) “localhost”
FILTER_SANITIZE_STRING ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_STRING http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_STRING https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_STRING ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_STRING mailto:sample@example.jp string(24) “mailto:sample@example.jp”

タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: このフラグを指定すると、シングルクォート (‘) およびダブルクォート (“) をエンコードしません。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES NULL string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES (空) string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 0 string(1) “0”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 1 string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES -1 string(2) “-1”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 0.1 string(3) “0.1”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES -0.1 string(4) “-0.1”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 10000 string(5) “10000”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES “10,000” string(6) “10,000”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 01 string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 0xabc string(4) “2748”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES “0xghi” string(5) “0xghi”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES true string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES false string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES yes string(3) “yes”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES no string(2) “no”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES on string(2) “on”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES off string(3) “off”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES ABC string(3) “ABC”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES abc string(3) “abc”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES あいう string(9) “あいう”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 漢字 string(6) “漢字”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES <div>test</div> string(4) “test”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES ! string(1) “!”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES # string(1) “#”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES $ string(1) “$”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES % string(1) “%”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES & string(1) “&”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES string(1) “‘”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES * string(1) “*”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES + string(1) “+”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES string(1) “-“
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES = string(1) “=”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES ? string(1) “?”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES ^ string(1) “^”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES _ string(1) “_”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES ` string(1) “`”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES { string(1) “{“
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES | string(1) “|”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES } string(1) “}”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES ~ string(1) “~”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES @ string(1) “@”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES . string(1) “.”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES [ string(1) “[“
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES ] string(1) “]”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES ( ※半角 string(1) “(“
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES ) ※半角 string(1) “)”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES ( ※全角 string(3) “(”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES ) ※全角 string(3) “)”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES string(1) “””
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES \ string(1) “\”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES ; string(1) “;”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES : string(1) “:”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES , string(1) “,”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES / string(1) “/”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES < string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES > string(1) “>”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES :80 string(3) “:80”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES localhost string(9) “localhost”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES mailto:sample@example.jp string(24) “mailto:sample@example.jp”

タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: コードが 32 未満の文字を除去します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW NULL string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW (空) string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 0 string(1) “0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 1 string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW -1 string(2) “-1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 0.1 string(3) “0.1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW -0.1 string(4) “-0.1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 10000 string(5) “10000”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW “10,000” string(6) “10,000”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 01 string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 0xabc string(4) “2748”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW “0xghi” string(5) “0xghi”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW true string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW false string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW yes string(3) “yes”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW no string(2) “no”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW on string(2) “on”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW off string(3) “off”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW ABC string(3) “ABC”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW abc string(3) “abc”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW あいう string(9) “あいう”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 漢字 string(6) “漢字”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW <div>test</div> string(4) “test”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW ! string(1) “!”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW # string(1) “#”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW $ string(1) “$”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW % string(1) “%”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW & string(1) “&”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW string(5) “‘”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW * string(1) “*”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW + string(1) “+”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW string(1) “-“
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW = string(1) “=”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW ? string(1) “?”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW ^ string(1) “^”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW _ string(1) “_”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW ` string(1) “`”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW { string(1) “{“
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | string(1) “|”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW } string(1) “}”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW ~ string(1) “~”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW @ string(1) “@”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW . string(1) “.”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW [ string(1) “[“
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW ] string(1) “]”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW ( ※半角 string(1) “(“
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW ) ※半角 string(1) “)”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW ( ※全角 string(3) “(”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW ) ※全角 string(3) “)”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW string(5) “””
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW \ string(1) “\”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW ; string(1) “;”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW : string(1) “:”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW , string(1) “,”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW / string(1) “/”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW < string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW > string(1) “>”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW :80 string(3) “:80”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW localhost string(9) “localhost”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW mailto:sample@example.jp string(24) “mailto:sample@example.jp”

タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: コードが 127 より大きい文字を除去します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH NULL string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH (空) string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 0 string(1) “0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 1 string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH -1 string(2) “-1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 0.1 string(3) “0.1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH -0.1 string(4) “-0.1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 10000 string(5) “10000”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH “10,000” string(6) “10,000”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 01 string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 0xabc string(4) “2748”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH “0xghi” string(5) “0xghi”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH true string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH false string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH yes string(3) “yes”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH no string(2) “no”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH on string(2) “on”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH off string(3) “off”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH ABC string(3) “ABC”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH abc string(3) “abc”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH あいう string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 漢字 string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH <div>test</div> string(4) “test”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH ! string(1) “!”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH # string(1) “#”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH $ string(1) “$”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH % string(1) “%”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH & string(1) “&”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH string(5) “‘”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH * string(1) “*”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH + string(1) “+”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH string(1) “-“
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH = string(1) “=”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH ? string(1) “?”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH ^ string(1) “^”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH _ string(1) “_”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH ` string(1) “`”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH { string(1) “{“
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH | string(1) “|”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH } string(1) “}”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH ~ string(1) “~”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH @ string(1) “@”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH . string(1) “.”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH [ string(1) “[“
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH ] string(1) “]”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH ( ※半角 string(1) “(“
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH ) ※半角 string(1) “)”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH ( ※全角 string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH ) ※全角 string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH string(5) “””
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH \ string(1) “\”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH ; string(1) “;”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH : string(1) “:”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH , string(1) “,”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH / string(1) “/”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH < string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH > string(1) “>”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH :80 string(3) “:80”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH localhost string(9) “localhost”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH mailto:sample@example.jp string(24) “mailto:sample@example.jp”

タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: バックティック文字を除去します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK NULL string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK (空) string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 0 string(1) “0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 1 string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK -1 string(2) “-1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 0.1 string(3) “0.1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK -0.1 string(4) “-0.1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 10000 string(5) “10000”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK “10,000” string(6) “10,000”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 01 string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 0xabc string(4) “2748”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK “0xghi” string(5) “0xghi”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK true string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK false string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK yes string(3) “yes”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK no string(2) “no”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK on string(2) “on”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK off string(3) “off”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK ABC string(3) “ABC”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK abc string(3) “abc”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK あいう string(9) “あいう”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 漢字 string(6) “漢字”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK <div>test</div> string(4) “test”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK ! string(1) “!”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK # string(1) “#”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK $ string(1) “$”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK % string(1) “%”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK & string(1) “&”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK string(5) “‘”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK * string(1) “*”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK + string(1) “+”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK string(1) “-“
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK = string(1) “=”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK ? string(1) “?”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK ^ string(1) “^”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK _ string(1) “_”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK ` string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK { string(1) “{“
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK | string(1) “|”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK } string(1) “}”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK ~ string(1) “~”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK @ string(1) “@”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK . string(1) “.”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK [ string(1) “[“
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK ] string(1) “]”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK ( ※半角 string(1) “(“
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK ) ※半角 string(1) “)”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK ( ※全角 string(3) “(”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK ) ※全角 string(3) “)”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK string(5) “””
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK \ string(1) “\”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK ; string(1) “;”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK : string(1) “:”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK , string(1) “,”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK / string(1) “/”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK < string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK > string(1) “>”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK :80 string(3) “:80”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK localhost string(9) “localhost”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK mailto:sample@example.jp string(24) “mailto:sample@example.jp”

タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: コードが 32 未満のすべての文字をエンコードします。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW NULL string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW (空) string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 0 string(1) “0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 1 string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW -1 string(2) “-1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 0.1 string(3) “0.1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW -0.1 string(4) “-0.1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 10000 string(5) “10000”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW “10,000” string(6) “10,000”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 01 string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 0xabc string(4) “2748”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW “0xghi” string(5) “0xghi”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW true string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW false string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW yes string(3) “yes”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW no string(2) “no”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW on string(2) “on”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW off string(3) “off”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW ABC string(3) “ABC”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW abc string(3) “abc”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW あいう string(9) “あいう”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 漢字 string(6) “漢字”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW <div>test</div> string(4) “test”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW ! string(1) “!”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW # string(1) “#”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW $ string(1) “$”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW % string(1) “%”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW & string(1) “&”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW string(5) “‘”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW * string(1) “*”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW + string(1) “+”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW string(1) “-“
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW = string(1) “=”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW ? string(1) “?”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW ^ string(1) “^”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW _ string(1) “_”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW ` string(1) “`”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW { string(1) “{“
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW | string(1) “|”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW } string(1) “}”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW ~ string(1) “~”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW @ string(1) “@”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW . string(1) “.”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW [ string(1) “[“
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW ] string(1) “]”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW ( ※半角 string(1) “(“
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW ) ※半角 string(1) “)”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW ( ※全角 string(3) “(”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW ) ※全角 string(3) “)”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW string(5) “””
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW \ string(1) “\”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW ; string(1) “;”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW : string(1) “:”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW , string(1) “,”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW / string(1) “/”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW < string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW > string(1) “>”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW :80 string(3) “:80”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW localhost string(9) “localhost”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW mailto:sample@example.jp string(24) “mailto:sample@example.jp”

タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: コードが 127 より大きいすべての文字をエンコードします。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH NULL string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH (空) string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 0 string(1) “0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 1 string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH -1 string(2) “-1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 0.1 string(3) “0.1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH -0.1 string(4) “-0.1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 10000 string(5) “10000”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH “10,000” string(6) “10,000”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 01 string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 0xabc string(4) “2748”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH “0xghi” string(5) “0xghi”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH true string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH false string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH yes string(3) “yes”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH no string(2) “no”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH on string(2) “on”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH off string(3) “off”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH ABC string(3) “ABC”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH abc string(3) “abc”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH あいう string(54) “ã‚ã„㆔
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 漢字 string(36) “漢字”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH <div>test</div> string(4) “test”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH ! string(1) “!”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH # string(1) “#”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH $ string(1) “$”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH % string(1) “%”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH & string(1) “&”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH string(5) “‘”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH * string(1) “*”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH + string(1) “+”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH string(1) “-“
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH = string(1) “=”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH ? string(1) “?”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH ^ string(1) “^”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH _ string(1) “_”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH ` string(1) “`”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH { string(1) “{“
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH | string(1) “|”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH } string(1) “}”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH ~ string(1) “~”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH @ string(1) “@”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH . string(1) “.”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH [ string(1) “[“
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH ] string(1) “]”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH ( ※半角 string(1) “(“
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH ) ※半角 string(1) “)”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH ( ※全角 string(18) “(”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH ) ※全角 string(18) “)”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH string(5) “””
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH \ string(1) “\”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH ; string(1) “;”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH : string(1) “:”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH , string(1) “,”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH / string(1) “/”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH < string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH > string(1) “>”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH :80 string(3) “:80”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH localhost string(9) “localhost”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH mailto:sample@example.jp string(24) “mailto:sample@example.jp”

タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。
フィルタフラグ: アンパサンド (&) をエンコードします。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP NULL string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP (空) string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 0 string(1) “0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 1 string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP -1 string(2) “-1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 0.1 string(3) “0.1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP -0.1 string(4) “-0.1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 10000 string(5) “10000”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP “10,000” string(6) “10,000”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 01 string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 0xabc string(4) “2748”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP “0xghi” string(5) “0xghi”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP true string(1) “1”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP false string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP yes string(3) “yes”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP no string(2) “no”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP on string(2) “on”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP off string(3) “off”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP ABC string(3) “ABC”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP abc string(3) “abc”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP あいう string(9) “あいう”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 漢字 string(6) “漢字”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP <div>test</div> string(4) “test”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP ! string(1) “!”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP # string(1) “#”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP $ string(1) “$”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP % string(1) “%”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP & string(5) “&”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP string(5) “‘”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP * string(1) “*”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP + string(1) “+”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP string(1) “-“
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP = string(1) “=”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP ? string(1) “?”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP ^ string(1) “^”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP _ string(1) “_”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP ` string(1) “`”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP { string(1) “{“
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP | string(1) “|”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP } string(1) “}”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP ~ string(1) “~”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP @ string(1) “@”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP . string(1) “.”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP [ string(1) “[“
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP ] string(1) “]”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP ( ※半角 string(1) “(“
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP ) ※半角 string(1) “)”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP ( ※全角 string(3) “(”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP ) ※全角 string(3) “)”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP string(5) “””
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP \ string(1) “\”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP ; string(1) “;”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP : string(1) “:”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP , string(1) “,”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP / string(1) “/”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP < string(0) “”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP > string(1) “>”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP :80 string(3) “:80”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP localhost string(9) “localhost”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP mailto:sample@example.jp string(24) “mailto:sample@example.jp”

“string” フィルタのエイリアス。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_STRIPPED NULL string(0) “”
FILTER_SANITIZE_STRIPPED (空) string(0) “”
FILTER_SANITIZE_STRIPPED 0 string(1) “0”
FILTER_SANITIZE_STRIPPED 1 string(1) “1”
FILTER_SANITIZE_STRIPPED -1 string(2) “-1”
FILTER_SANITIZE_STRIPPED 0.1 string(3) “0.1”
FILTER_SANITIZE_STRIPPED -0.1 string(4) “-0.1”
FILTER_SANITIZE_STRIPPED 10000 string(5) “10000”
FILTER_SANITIZE_STRIPPED “10,000” string(6) “10,000”
FILTER_SANITIZE_STRIPPED 01 string(1) “1”
FILTER_SANITIZE_STRIPPED 0xabc string(4) “2748”
FILTER_SANITIZE_STRIPPED “0xghi” string(5) “0xghi”
FILTER_SANITIZE_STRIPPED true string(1) “1”
FILTER_SANITIZE_STRIPPED false string(0) “”
FILTER_SANITIZE_STRIPPED yes string(3) “yes”
FILTER_SANITIZE_STRIPPED no string(2) “no”
FILTER_SANITIZE_STRIPPED on string(2) “on”
FILTER_SANITIZE_STRIPPED off string(3) “off”
FILTER_SANITIZE_STRIPPED ABC string(3) “ABC”
FILTER_SANITIZE_STRIPPED abc string(3) “abc”
FILTER_SANITIZE_STRIPPED あいう string(9) “あいう”
FILTER_SANITIZE_STRIPPED 漢字 string(6) “漢字”
FILTER_SANITIZE_STRIPPED <div>test</div> string(4) “test”
FILTER_SANITIZE_STRIPPED ! string(1) “!”
FILTER_SANITIZE_STRIPPED # string(1) “#”
FILTER_SANITIZE_STRIPPED $ string(1) “$”
FILTER_SANITIZE_STRIPPED % string(1) “%”
FILTER_SANITIZE_STRIPPED & string(1) “&”
FILTER_SANITIZE_STRIPPED string(5) “‘”
FILTER_SANITIZE_STRIPPED * string(1) “*”
FILTER_SANITIZE_STRIPPED + string(1) “+”
FILTER_SANITIZE_STRIPPED string(1) “-“
FILTER_SANITIZE_STRIPPED = string(1) “=”
FILTER_SANITIZE_STRIPPED ? string(1) “?”
FILTER_SANITIZE_STRIPPED ^ string(1) “^”
FILTER_SANITIZE_STRIPPED _ string(1) “_”
FILTER_SANITIZE_STRIPPED ` string(1) “`”
FILTER_SANITIZE_STRIPPED { string(1) “{“
FILTER_SANITIZE_STRIPPED | string(1) “|”
FILTER_SANITIZE_STRIPPED } string(1) “}”
FILTER_SANITIZE_STRIPPED ~ string(1) “~”
FILTER_SANITIZE_STRIPPED @ string(1) “@”
FILTER_SANITIZE_STRIPPED . string(1) “.”
FILTER_SANITIZE_STRIPPED [ string(1) “[“
FILTER_SANITIZE_STRIPPED ] string(1) “]”
FILTER_SANITIZE_STRIPPED ( ※半角 string(1) “(“
FILTER_SANITIZE_STRIPPED ) ※半角 string(1) “)”
FILTER_SANITIZE_STRIPPED ( ※全角 string(3) “(”
FILTER_SANITIZE_STRIPPED ) ※全角 string(3) “)”
FILTER_SANITIZE_STRIPPED string(5) “””
FILTER_SANITIZE_STRIPPED \ string(1) “\”
FILTER_SANITIZE_STRIPPED ; string(1) “;”
FILTER_SANITIZE_STRIPPED : string(1) “:”
FILTER_SANITIZE_STRIPPED , string(1) “,”
FILTER_SANITIZE_STRIPPED / string(1) “/”
FILTER_SANITIZE_STRIPPED < string(0) “”
FILTER_SANITIZE_STRIPPED > string(1) “>”
FILTER_SANITIZE_STRIPPED sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_STRIPPED .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_STRIPPED sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_STRIPPED sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_STRIPPED test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_STRIPPED myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_STRIPPED 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_STRIPPED 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_STRIPPED 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_STRIPPED 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_STRIPPED 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_STRIPPED 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_STRIPPED 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_STRIPPED 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_STRIPPED 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_STRIPPED 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_STRIPPED 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_STRIPPED 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_STRIPPED 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_STRIPPED 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_STRIPPED 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_STRIPPED :80 string(3) “:80”
FILTER_SANITIZE_STRIPPED localhost string(9) “localhost”
FILTER_SANITIZE_STRIPPED ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRIPPED FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRIPPED FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_STRIPPED FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRIPPED 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_STRIPPED 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_STRIPPED http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_STRIPPED https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_STRIPPED ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_STRIPPED mailto:sample@example.jp string(24) “mailto:sample@example.jp”

英字、数字および $-_.+!*'(),{}|\^~[]`<>#%”;/?:@&= 以外のすべての文字を取り除きます。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_SANITIZE_URL NULL string(0) “”
FILTER_SANITIZE_URL (空) string(0) “”
FILTER_SANITIZE_URL 0 string(1) “0”
FILTER_SANITIZE_URL 1 string(1) “1”
FILTER_SANITIZE_URL -1 string(2) “-1”
FILTER_SANITIZE_URL 0.1 string(3) “0.1”
FILTER_SANITIZE_URL -0.1 string(4) “-0.1”
FILTER_SANITIZE_URL 10000 string(5) “10000”
FILTER_SANITIZE_URL “10,000” string(6) “10,000”
FILTER_SANITIZE_URL 01 string(1) “1”
FILTER_SANITIZE_URL 0xabc string(4) “2748”
FILTER_SANITIZE_URL “0xghi” string(5) “0xghi”
FILTER_SANITIZE_URL true string(1) “1”
FILTER_SANITIZE_URL false string(0) “”
FILTER_SANITIZE_URL yes string(3) “yes”
FILTER_SANITIZE_URL no string(2) “no”
FILTER_SANITIZE_URL on string(2) “on”
FILTER_SANITIZE_URL off string(3) “off”
FILTER_SANITIZE_URL ABC string(3) “ABC”
FILTER_SANITIZE_URL abc string(3) “abc”
FILTER_SANITIZE_URL あいう string(0) “”
FILTER_SANITIZE_URL 漢字 string(0) “”
FILTER_SANITIZE_URL <div>test</div> string(15) ”

test

FILTER_SANITIZE_URL ! string(1) “!”
FILTER_SANITIZE_URL # string(1) “#”
FILTER_SANITIZE_URL $ string(1) “$”
FILTER_SANITIZE_URL % string(1) “%”
FILTER_SANITIZE_URL & string(1) “&”
FILTER_SANITIZE_URL string(1) “‘”
FILTER_SANITIZE_URL * string(1) “*”
FILTER_SANITIZE_URL + string(1) “+”
FILTER_SANITIZE_URL string(1) “-“
FILTER_SANITIZE_URL = string(1) “=”
FILTER_SANITIZE_URL ? string(1) “?”
FILTER_SANITIZE_URL ^ string(1) “^”
FILTER_SANITIZE_URL _ string(1) “_”
FILTER_SANITIZE_URL ` string(1) “`”
FILTER_SANITIZE_URL { string(1) “{“
FILTER_SANITIZE_URL | string(1) “|”
FILTER_SANITIZE_URL } string(1) “}”
FILTER_SANITIZE_URL ~ string(1) “~”
FILTER_SANITIZE_URL @ string(1) “@”
FILTER_SANITIZE_URL . string(1) “.”
FILTER_SANITIZE_URL [ string(1) “[“
FILTER_SANITIZE_URL ] string(1) “]”
FILTER_SANITIZE_URL ( ※半角 string(1) “(“
FILTER_SANITIZE_URL ) ※半角 string(1) “)”
FILTER_SANITIZE_URL ( ※全角 string(0) “”
FILTER_SANITIZE_URL ) ※全角 string(0) “”
FILTER_SANITIZE_URL string(1) “””
FILTER_SANITIZE_URL \ string(1) “\”
FILTER_SANITIZE_URL ; string(1) “;”
FILTER_SANITIZE_URL : string(1) “:”
FILTER_SANITIZE_URL , string(1) “,”
FILTER_SANITIZE_URL / string(1) “/”
FILTER_SANITIZE_URL < string(1) “<“
FILTER_SANITIZE_URL > string(1) “>”
FILTER_SANITIZE_URL sample@example.jp string(17) “sample@example.jp”
FILTER_SANITIZE_URL .sample@example.jp string(18) “.sample@example.jp”
FILTER_SANITIZE_URL sample.@example.jp string(18) “sample.@example.jp”
FILTER_SANITIZE_URL sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_SANITIZE_URL test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_SANITIZE_URL myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_SANITIZE_URL 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_SANITIZE_URL 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_SANITIZE_URL 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_SANITIZE_URL 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_SANITIZE_URL 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_SANITIZE_URL 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_SANITIZE_URL 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_SANITIZE_URL 10.0.0.0 string(8) “10.0.0.0”
FILTER_SANITIZE_URL 172.16.0.0 string(10) “172.16.0.0”
FILTER_SANITIZE_URL 192.168.0.0 string(11) “192.168.0.0”
FILTER_SANITIZE_URL 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_SANITIZE_URL 0.0.0.0 string(7) “0.0.0.0”
FILTER_SANITIZE_URL 169.254.0.0 string(11) “169.254.0.0”
FILTER_SANITIZE_URL 127.0.0.0 string(9) “127.0.0.0”
FILTER_SANITIZE_URL 240.0.0.0 string(9) “240.0.0.0”
FILTER_SANITIZE_URL :80 string(3) “:80”
FILTER_SANITIZE_URL localhost string(9) “localhost”
FILTER_SANITIZE_URL ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_URL FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_URL FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_SANITIZE_URL FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_URL 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_SANITIZE_URL 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_SANITIZE_URL http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_SANITIZE_URL https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_SANITIZE_URL ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_SANITIZE_URL mailto:sample@example.jp string(24) “mailto:sample@example.jp”

何もせず、オプションで特殊文字を取り除いたりエンコードしたりします。 FILTER_DEFAULT は、このフィルタのエイリアスです。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_UNSAFE_RAW NULL string(0) “”
FILTER_UNSAFE_RAW (空) string(0) “”
FILTER_UNSAFE_RAW 0 string(1) “0”
FILTER_UNSAFE_RAW 1 string(1) “1”
FILTER_UNSAFE_RAW -1 string(2) “-1”
FILTER_UNSAFE_RAW 0.1 string(3) “0.1”
FILTER_UNSAFE_RAW -0.1 string(4) “-0.1”
FILTER_UNSAFE_RAW 10000 string(5) “10000”
FILTER_UNSAFE_RAW “10,000” string(6) “10,000”
FILTER_UNSAFE_RAW 01 string(1) “1”
FILTER_UNSAFE_RAW 0xabc string(4) “2748”
FILTER_UNSAFE_RAW “0xghi” string(5) “0xghi”
FILTER_UNSAFE_RAW true string(1) “1”
FILTER_UNSAFE_RAW false string(0) “”
FILTER_UNSAFE_RAW yes string(3) “yes”
FILTER_UNSAFE_RAW no string(2) “no”
FILTER_UNSAFE_RAW on string(2) “on”
FILTER_UNSAFE_RAW off string(3) “off”
FILTER_UNSAFE_RAW ABC string(3) “ABC”
FILTER_UNSAFE_RAW abc string(3) “abc”
FILTER_UNSAFE_RAW あいう string(9) “あいう”
FILTER_UNSAFE_RAW 漢字 string(6) “漢字”
FILTER_UNSAFE_RAW <div>test</div> string(15) ”

test

FILTER_UNSAFE_RAW ! string(1) “!”
FILTER_UNSAFE_RAW # string(1) “#”
FILTER_UNSAFE_RAW $ string(1) “$”
FILTER_UNSAFE_RAW % string(1) “%”
FILTER_UNSAFE_RAW & string(1) “&”
FILTER_UNSAFE_RAW string(1) “‘”
FILTER_UNSAFE_RAW * string(1) “*”
FILTER_UNSAFE_RAW + string(1) “+”
FILTER_UNSAFE_RAW string(1) “-“
FILTER_UNSAFE_RAW = string(1) “=”
FILTER_UNSAFE_RAW ? string(1) “?”
FILTER_UNSAFE_RAW ^ string(1) “^”
FILTER_UNSAFE_RAW _ string(1) “_”
FILTER_UNSAFE_RAW ` string(1) “`”
FILTER_UNSAFE_RAW { string(1) “{“
FILTER_UNSAFE_RAW | string(1) “|”
FILTER_UNSAFE_RAW } string(1) “}”
FILTER_UNSAFE_RAW ~ string(1) “~”
FILTER_UNSAFE_RAW @ string(1) “@”
FILTER_UNSAFE_RAW . string(1) “.”
FILTER_UNSAFE_RAW [ string(1) “[“
FILTER_UNSAFE_RAW ] string(1) “]”
FILTER_UNSAFE_RAW ( ※半角 string(1) “(“
FILTER_UNSAFE_RAW ) ※半角 string(1) “)”
FILTER_UNSAFE_RAW ( ※全角 string(3) “(”
FILTER_UNSAFE_RAW ) ※全角 string(3) “)”
FILTER_UNSAFE_RAW string(1) “””
FILTER_UNSAFE_RAW \ string(1) “\”
FILTER_UNSAFE_RAW ; string(1) “;”
FILTER_UNSAFE_RAW : string(1) “:”
FILTER_UNSAFE_RAW , string(1) “,”
FILTER_UNSAFE_RAW / string(1) “/”
FILTER_UNSAFE_RAW < string(1) “<“
FILTER_UNSAFE_RAW > string(1) “>”
FILTER_UNSAFE_RAW sample@example.jp string(17) “sample@example.jp”
FILTER_UNSAFE_RAW .sample@example.jp string(18) “.sample@example.jp”
FILTER_UNSAFE_RAW sample.@example.jp string(18) “sample.@example.jp”
FILTER_UNSAFE_RAW sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_UNSAFE_RAW test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_UNSAFE_RAW myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_UNSAFE_RAW 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_UNSAFE_RAW 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_UNSAFE_RAW 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_UNSAFE_RAW 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_UNSAFE_RAW 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_UNSAFE_RAW 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_UNSAFE_RAW 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_UNSAFE_RAW 10.0.0.0 string(8) “10.0.0.0”
FILTER_UNSAFE_RAW 172.16.0.0 string(10) “172.16.0.0”
FILTER_UNSAFE_RAW 192.168.0.0 string(11) “192.168.0.0”
FILTER_UNSAFE_RAW 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_UNSAFE_RAW 0.0.0.0 string(7) “0.0.0.0”
FILTER_UNSAFE_RAW 169.254.0.0 string(11) “169.254.0.0”
FILTER_UNSAFE_RAW 127.0.0.0 string(9) “127.0.0.0”
FILTER_UNSAFE_RAW 240.0.0.0 string(9) “240.0.0.0”
FILTER_UNSAFE_RAW :80 string(3) “:80”
FILTER_UNSAFE_RAW localhost string(9) “localhost”
FILTER_UNSAFE_RAW ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_UNSAFE_RAW 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_UNSAFE_RAW 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_UNSAFE_RAW http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_UNSAFE_RAW https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_UNSAFE_RAW ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_UNSAFE_RAW mailto:sample@example.jp string(24) “mailto:sample@example.jp”

何もせず、オプションで特殊文字を取り除いたりエンコードしたりします。 FILTER_DEFAULT は、このフィルタのエイリアスです。
フィルタフラグ: コードが 32 未満の文字を除去します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW NULL string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW (空) string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 0 string(1) “0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 1 string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW -1 string(2) “-1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 0.1 string(3) “0.1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW -0.1 string(4) “-0.1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 10000 string(5) “10000”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW “10,000” string(6) “10,000”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 01 string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 0xabc string(4) “2748”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW “0xghi” string(5) “0xghi”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW true string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW false string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW yes string(3) “yes”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW no string(2) “no”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW on string(2) “on”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW off string(3) “off”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW ABC string(3) “ABC”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW abc string(3) “abc”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW あいう string(9) “あいう”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 漢字 string(6) “漢字”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW <div>test</div> string(15) ”

test

FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW ! string(1) “!”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW # string(1) “#”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW $ string(1) “$”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW % string(1) “%”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW & string(1) “&”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW string(1) “‘”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW * string(1) “*”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW + string(1) “+”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW string(1) “-“
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW = string(1) “=”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW ? string(1) “?”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW ^ string(1) “^”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW _ string(1) “_”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW ` string(1) “`”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW { string(1) “{“
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW | string(1) “|”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW } string(1) “}”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW ~ string(1) “~”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW @ string(1) “@”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW . string(1) “.”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW [ string(1) “[“
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW ] string(1) “]”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW ( ※半角 string(1) “(“
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW ) ※半角 string(1) “)”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW ( ※全角 string(3) “(”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW ) ※全角 string(3) “)”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW string(1) “””
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW \ string(1) “\”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW ; string(1) “;”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW : string(1) “:”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW , string(1) “,”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW / string(1) “/”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW < string(1) “<“
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW > string(1) “>”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW sample@example.jp string(17) “sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW .sample@example.jp string(18) “.sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW sample.@example.jp string(18) “sample.@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 10.0.0.0 string(8) “10.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 172.16.0.0 string(10) “172.16.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 192.168.0.0 string(11) “192.168.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 0.0.0.0 string(7) “0.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 169.254.0.0 string(11) “169.254.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 127.0.0.0 string(9) “127.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 240.0.0.0 string(9) “240.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW :80 string(3) “:80”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW localhost string(9) “localhost”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW mailto:sample@example.jp string(24) “mailto:sample@example.jp”

何もせず、オプションで特殊文字を取り除いたりエンコードしたりします。 FILTER_DEFAULT は、このフィルタのエイリアスです。
フィルタフラグ: コードが 127 より大きい文字を除去します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH NULL string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH (空) string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 0 string(1) “0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 1 string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH -1 string(2) “-1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 0.1 string(3) “0.1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH -0.1 string(4) “-0.1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 10000 string(5) “10000”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH “10,000” string(6) “10,000”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 01 string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 0xabc string(4) “2748”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH “0xghi” string(5) “0xghi”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH true string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH false string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH yes string(3) “yes”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH no string(2) “no”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH on string(2) “on”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH off string(3) “off”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH ABC string(3) “ABC”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH abc string(3) “abc”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH あいう string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 漢字 string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH <div>test</div> string(15) ”

test

FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH ! string(1) “!”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH # string(1) “#”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH $ string(1) “$”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH % string(1) “%”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH & string(1) “&”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH string(1) “‘”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH * string(1) “*”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH + string(1) “+”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH string(1) “-“
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH = string(1) “=”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH ? string(1) “?”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH ^ string(1) “^”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH _ string(1) “_”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH ` string(1) “`”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH { string(1) “{“
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH | string(1) “|”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH } string(1) “}”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH ~ string(1) “~”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH @ string(1) “@”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH . string(1) “.”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH [ string(1) “[“
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH ] string(1) “]”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH ( ※半角 string(1) “(“
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH ) ※半角 string(1) “)”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH ( ※全角 string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH ) ※全角 string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH string(1) “””
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH \ string(1) “\”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH ; string(1) “;”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH : string(1) “:”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH , string(1) “,”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH / string(1) “/”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH < string(1) “<“
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH > string(1) “>”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH sample@example.jp string(17) “sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH .sample@example.jp string(18) “.sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH sample.@example.jp string(18) “sample.@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 10.0.0.0 string(8) “10.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 172.16.0.0 string(10) “172.16.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 192.168.0.0 string(11) “192.168.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 0.0.0.0 string(7) “0.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 169.254.0.0 string(11) “169.254.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 127.0.0.0 string(9) “127.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 240.0.0.0 string(9) “240.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH :80 string(3) “:80”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH localhost string(9) “localhost”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH mailto:sample@example.jp string(24) “mailto:sample@example.jp”

何もせず、オプションで特殊文字を取り除いたりエンコードしたりします。 FILTER_DEFAULT は、このフィルタのエイリアスです。
フィルタフラグ: バックティック文字を除去します。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK NULL string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK (空) string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 0 string(1) “0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 1 string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK -1 string(2) “-1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 0.1 string(3) “0.1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK -0.1 string(4) “-0.1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 10000 string(5) “10000”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK “10,000” string(6) “10,000”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 01 string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 0xabc string(4) “2748”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK “0xghi” string(5) “0xghi”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK true string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK false string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK yes string(3) “yes”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK no string(2) “no”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK on string(2) “on”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK off string(3) “off”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK ABC string(3) “ABC”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK abc string(3) “abc”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK あいう string(9) “あいう”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 漢字 string(6) “漢字”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK <div>test</div> string(15) ”

test

FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK ! string(1) “!”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK # string(1) “#”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK $ string(1) “$”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK % string(1) “%”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK & string(1) “&”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK string(1) “‘”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK * string(1) “*”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK + string(1) “+”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK string(1) “-“
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK = string(1) “=”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK ? string(1) “?”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK ^ string(1) “^”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK _ string(1) “_”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK ` string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK { string(1) “{“
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK | string(1) “|”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK } string(1) “}”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK ~ string(1) “~”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK @ string(1) “@”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK . string(1) “.”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK [ string(1) “[“
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK ] string(1) “]”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK ( ※半角 string(1) “(“
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK ) ※半角 string(1) “)”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK ( ※全角 string(3) “(”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK ) ※全角 string(3) “)”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK string(1) “””
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK \ string(1) “\”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK ; string(1) “;”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK : string(1) “:”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK , string(1) “,”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK / string(1) “/”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK < string(1) “<“
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK > string(1) “>”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK sample@example.jp string(17) “sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK .sample@example.jp string(18) “.sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK sample.@example.jp string(18) “sample.@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 10.0.0.0 string(8) “10.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 172.16.0.0 string(10) “172.16.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 192.168.0.0 string(11) “192.168.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 0.0.0.0 string(7) “0.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 169.254.0.0 string(11) “169.254.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 127.0.0.0 string(9) “127.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 240.0.0.0 string(9) “240.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK :80 string(3) “:80”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK localhost string(9) “localhost”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK mailto:sample@example.jp string(24) “mailto:sample@example.jp”

何もせず、オプションで特殊文字を取り除いたりエンコードしたりします。 FILTER_DEFAULT は、このフィルタのエイリアスです。
フィルタフラグ: コードが 32 未満のすべての文字をエンコードします。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW NULL string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW (空) string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 0 string(1) “0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 1 string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW -1 string(2) “-1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 0.1 string(3) “0.1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW -0.1 string(4) “-0.1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 10000 string(5) “10000”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW “10,000” string(6) “10,000”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 01 string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 0xabc string(4) “2748”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW “0xghi” string(5) “0xghi”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW true string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW false string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW yes string(3) “yes”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW no string(2) “no”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW on string(2) “on”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW off string(3) “off”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW ABC string(3) “ABC”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW abc string(3) “abc”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW あいう string(9) “あいう”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 漢字 string(6) “漢字”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW <div>test</div> string(15) ”

test

FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW ! string(1) “!”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW # string(1) “#”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW $ string(1) “$”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW % string(1) “%”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW & string(1) “&”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW string(1) “‘”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW * string(1) “*”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW + string(1) “+”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW string(1) “-“
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW = string(1) “=”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW ? string(1) “?”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW ^ string(1) “^”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW _ string(1) “_”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW ` string(1) “`”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW { string(1) “{“
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW | string(1) “|”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW } string(1) “}”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW ~ string(1) “~”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW @ string(1) “@”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW . string(1) “.”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW [ string(1) “[“
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW ] string(1) “]”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW ( ※半角 string(1) “(“
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW ) ※半角 string(1) “)”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW ( ※全角 string(3) “(”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW ) ※全角 string(3) “)”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW string(1) “””
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW \ string(1) “\”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW ; string(1) “;”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW : string(1) “:”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW , string(1) “,”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW / string(1) “/”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW < string(1) “<“
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW > string(1) “>”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW sample@example.jp string(17) “sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW .sample@example.jp string(18) “.sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW sample.@example.jp string(18) “sample.@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 10.0.0.0 string(8) “10.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 172.16.0.0 string(10) “172.16.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 192.168.0.0 string(11) “192.168.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 0.0.0.0 string(7) “0.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 169.254.0.0 string(11) “169.254.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 127.0.0.0 string(9) “127.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 240.0.0.0 string(9) “240.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW :80 string(3) “:80”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW localhost string(9) “localhost”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW mailto:sample@example.jp string(24) “mailto:sample@example.jp”

何もせず、オプションで特殊文字を取り除いたりエンコードしたりします。 FILTER_DEFAULT は、このフィルタのエイリアスです。
フィルタフラグ: コードが 127 より大きいすべての文字をエンコードします。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH NULL string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH (空) string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 0 string(1) “0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 1 string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH -1 string(2) “-1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 0.1 string(3) “0.1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH -0.1 string(4) “-0.1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 10000 string(5) “10000”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH “10,000” string(6) “10,000”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 01 string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 0xabc string(4) “2748”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH “0xghi” string(5) “0xghi”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH true string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH false string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH yes string(3) “yes”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH no string(2) “no”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH on string(2) “on”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH off string(3) “off”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH ABC string(3) “ABC”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH abc string(3) “abc”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH あいう string(54) “ã‚ã„㆔
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 漢字 string(36) “漢字”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH <div>test</div> string(15) ”

test

FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH ! string(1) “!”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH # string(1) “#”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH $ string(1) “$”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH % string(1) “%”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH & string(1) “&”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH string(1) “‘”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH * string(1) “*”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH + string(1) “+”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH string(1) “-“
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH = string(1) “=”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH ? string(1) “?”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH ^ string(1) “^”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH _ string(1) “_”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH ` string(1) “`”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH { string(1) “{“
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH | string(1) “|”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH } string(1) “}”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH ~ string(1) “~”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH @ string(1) “@”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH . string(1) “.”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH [ string(1) “[“
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH ] string(1) “]”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH ( ※半角 string(1) “(“
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH ) ※半角 string(1) “)”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH ( ※全角 string(18) “(”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH ) ※全角 string(18) “)”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH string(1) “””
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH \ string(1) “\”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH ; string(1) “;”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH : string(1) “:”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH , string(1) “,”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH / string(1) “/”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH < string(1) “<“
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH > string(1) “>”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH sample@example.jp string(17) “sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH .sample@example.jp string(18) “.sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH sample.@example.jp string(18) “sample.@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 10.0.0.0 string(8) “10.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 172.16.0.0 string(10) “172.16.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 192.168.0.0 string(11) “192.168.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 0.0.0.0 string(7) “0.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 169.254.0.0 string(11) “169.254.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 127.0.0.0 string(9) “127.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 240.0.0.0 string(9) “240.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH :80 string(3) “:80”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH localhost string(9) “localhost”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH mailto:sample@example.jp string(24) “mailto:sample@example.jp”

何もせず、オプションで特殊文字を取り除いたりエンコードしたりします。 FILTER_DEFAULT は、このフィルタのエイリアスです。
フィルタフラグ: アンパサンド (&) をエンコードします。

フィルターおよびフィルタフラグ テストする値 フィルターの結果
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP NULL string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP (空) string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 0 string(1) “0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 1 string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP -1 string(2) “-1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 0.1 string(3) “0.1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP -0.1 string(4) “-0.1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 10000 string(5) “10000”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP “10,000” string(6) “10,000”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 01 string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 0xabc string(4) “2748”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP “0xghi” string(5) “0xghi”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP true string(1) “1”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP false string(0) “”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP yes string(3) “yes”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP no string(2) “no”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP on string(2) “on”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP off string(3) “off”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP ABC string(3) “ABC”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP abc string(3) “abc”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP あいう string(9) “あいう”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 漢字 string(6) “漢字”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP <div>test</div> string(15) ”

test

FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP ! string(1) “!”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP # string(1) “#”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP $ string(1) “$”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP % string(1) “%”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP & string(5) “&”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP string(1) “‘”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP * string(1) “*”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP + string(1) “+”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP string(1) “-“
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP = string(1) “=”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP ? string(1) “?”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP ^ string(1) “^”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP _ string(1) “_”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP ` string(1) “`”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP { string(1) “{“
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP | string(1) “|”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP } string(1) “}”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP ~ string(1) “~”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP @ string(1) “@”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP . string(1) “.”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP [ string(1) “[“
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP ] string(1) “]”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP ( ※半角 string(1) “(“
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP ) ※半角 string(1) “)”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP ( ※全角 string(3) “(”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP ) ※全角 string(3) “)”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP string(1) “””
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP \ string(1) “\”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP ; string(1) “;”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP : string(1) “:”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP , string(1) “,”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP / string(1) “/”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP < string(1) “<“
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP > string(1) “>”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP sample@example.jp string(17) “sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP .sample@example.jp string(18) “.sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP sample.@example.jp string(18) “sample.@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP sam..ple@example.jp string(19) “sam..ple@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP test.sample@example.jp string(22) “test.sample@example.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP myaddress+test2@gmail.com string(25) “myaddress+test2@gmail.com”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 10.0.0.0/8 string(10) “10.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 172.16.0.0/12 string(13) “172.16.0.0/12”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 192.168.0.0/16 string(14) “192.168.0.0/16”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 0.0.0.0/8 string(9) “0.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 169.254.0.0/16 string(14) “169.254.0.0/16”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 127.0.0.0/8 string(11) “127.0.0.0/8”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 240.0.0.0/4 string(11) “240.0.0.0/4”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 10.0.0.0 string(8) “10.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 172.16.0.0 string(10) “172.16.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 192.168.0.0 string(11) “192.168.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 192.168.0.0:80 string(14) “192.168.0.0:80”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 0.0.0.0 string(7) “0.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 169.254.0.0 string(11) “169.254.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 127.0.0.0 string(9) “127.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 240.0.0.0 string(9) “240.0.0.0”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP :80 string(3) “:80”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP localhost string(9) “localhost”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “ABCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP FDCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FDCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP FGCD:EF01:2345:6789:ABCD:EF01:2345:6789 string(39) “FGCD:EF01:2345:6789:ABCD:EF01:2345:6789”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP FG:DB8:0:0:8:800:200C:417A string(26) “FG:DB8:0:0:8:800:200C:417A”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 2001:DB8:0:0:8:800:200C:417A string(28) “2001:DB8:0:0:8:800:200C:417A”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP 12:34:56:78:9a:bc string(17) “12:34:56:78:9a:bc”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP http://www.yahoo.co.jp string(22) “http://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP https://www.yahoo.co.jp string(23) “https://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP ssh://www.yahoo.co.jp string(21) “ssh://www.yahoo.co.jp”
FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP mailto:sample@example.jp string(24) “mailto:sample@example.jp”

■ テストコード

PHP

mb_internal_encoding("UTF-8");

function view($view_name, $filter, $options = NULL) {

	$array = array(
		'NULL' => NULL,
		'(空)' => '',
		'0' => 0,
		'1' => 1,
		'-1' => -1,
		'0.1' => 0.1,
		'-0.1' => -0.1,
		'10000' => 10000,
		'"10,000"' => "10,000",
		'01' => 01,
		'0xabc' => 0xabc,
		'"0xghi"' => "0xghi",
		'true' => true,
		'false' => false,
		'yes' => 'yes',
		'no' => 'no',
		'on' => 'on',
		'off' => 'off',
		'ABC' => 'ABC',
		'abc' => 'abc',
		'あいう' => 'あいう',
		'漢字' => '漢字',
		'<div>test</div>' => '<div>test</div>',
		'!' => '!',
		'#' => '#',
		'$' => '$',
		'%' => '%',
		'&' => '&',
		'\'' => '\'',
		'*' => '*',
		'+' => '+',
		'-' => '-',
		'=' => '=',
		'?' => '?',
		'^' => '^',
		'_' => '_',
		'`' => '`',
		'{' => '{',
		'|' => '|',
		'}' => '}',
		'~' => '~',
		'@' => '@',
		'.' => '.',
		'[' => '[',
		']' => ']',
		'( ※半角' => '(',
		') ※半角' => ')',
		'( ※全角' => '(',
		') ※全角' => ')',
		'"' => '"',
		'?' => '?',
		'\\' => '\\',
		';' => ';',
		':' => ':',
		',' => ',',
		'/' => '/',
		'<' => '<',
		'>' => '>',
		'sample@example.jp' => 'sample@example.jp',
		'.sample@example.jp' => '.sample@example.jp',
		'sample.@example.jp' => 'sample.@example.jp',
		'sam..ple@example.jp' => 'sam..ple@example.jp',
		'test.sample@example.jp' => 'test.sample@example.jp',
		'myaddress+test2@gmail.com' => 'myaddress+test2@gmail.com',
		'10.0.0.0/8' => '10.0.0.0/8',
		'172.16.0.0/12' => '172.16.0.0/12',
		'192.168.0.0/16' => '192.168.0.0/16',
		'0.0.0.0/8' => '0.0.0.0/8',
		'169.254.0.0/16' => '169.254.0.0/16',
		'127.0.0.0/8' => '127.0.0.0/8',
		'240.0.0.0/4' => '240.0.0.0/4',
		'10.0.0.0' => '10.0.0.0',
		'172.16.0.0' => '172.16.0.0',
		'192.168.0.0' => '192.168.0.0',
		'192.168.0.0:80' => '192.168.0.0:80',
		'0.0.0.0' => '0.0.0.0',
		'169.254.0.0' => '169.254.0.0',
		'127.0.0.0' => '127.0.0.0',
		'240.0.0.0' => '240.0.0.0',
		':80' => ':80',
		'localhost' => 'localhost',
		'ABCD:EF01:2345:6789:ABCD:EF01:2345:6789' => 'ABCD:EF01:2345:6789:ABCD:EF01:2345:6789',
		'FDCD:EF01:2345:6789:ABCD:EF01:2345:6789' => 'FDCD:EF01:2345:6789:ABCD:EF01:2345:6789',
		'FGCD:EF01:2345:6789:ABCD:EF01:2345:6789' => 'FGCD:EF01:2345:6789:ABCD:EF01:2345:6789',
		'FG:DB8:0:0:8:800:200C:417A' => 'FG:DB8:0:0:8:800:200C:417A',
		'2001:DB8:0:0:8:800:200C:417A' => '2001:DB8:0:0:8:800:200C:417A',
		'12:34:56:78:9a:bc' => '12:34:56:78:9a:bc',
		'http://www.yahoo.co.jp' => 'http://www.yahoo.co.jp',
		'https://www.yahoo.co.jp' => 'https://www.yahoo.co.jp',
		'ssh://www.yahoo.co.jp' => 'ssh://www.yahoo.co.jp',
		'mailto:sample@example.jp' => 'mailto:sample@example.jp',
	);

	ob_start();
	echo "<table>\n";
	echo "<tr><th>フィルターおよびフィルタフラグ</th><th>テストする値</th><th>フィルターの結果</th></tr>\n";
	foreach ($array as $key => $value) {
		echo "<tr>";
		echo "<td>".$view_name."</td>";
		echo "<td>".$key."</td>";
		echo "<td>";
		var_dump(filter_var($value, $filter ,$options));
		echo "</td>";
		echo "</tr>\n";
	}
	echo "</table>\n";
	$view = ob_get_contents();
	ob_end_clean();

	return $view;
}

$view_html = NULL;

$view_html .= '<h2>検証フィルタ</h2>'."\n";

$view_html .= '<p>"1"、"true"、"on" および "yes" の場合に TRUE、 それ以外の場合に FALSE を返します。FILTER_NULL_ON_FAILURE が設定されている場合は、 FALSE が返されるのは "0"、"false"、"off"、"no" および "" の場合のみとなります。 boolean 以外の値については NULL を返します。</p>'."\n";
$view_html .= view('FILTER_VALIDATE_BOOLEAN', FILTER_VALIDATE_BOOLEAN);

$view_html .= '<p>"1"、"true"、"on" および "yes" の場合に TRUE、 それ以外の場合に FALSE を返します。FILTER_NULL_ON_FAILURE が設定されている場合は、 FALSE が返されるのは "0"、"false"、"off"、"no" および "" の場合のみとなります。 boolean 以外の値については NULL を返します。<br>'."\n";
$view_html .= 'フィルタフラグ: boolean 値として認識できない値の場合に NULL を返します。</p>'."\n";
$view_html .= view('FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE', FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);

$view_html .= '<p>e-mail アドレスが RFC 822 に沿った形式であるかどうかを確かめます。 ただし、コメントおよび空白の折り返し (whitespace folding) には対応していません。</p>'."\n";
$view_html .= view('FILTER_VALIDATE_EMAIL', FILTER_VALIDATE_EMAIL);

$view_html .= '<p>値が float であるかどうかを検証し、成功した場合は値を float に変換します。</p>'."\n";
$view_html .= view('FILTER_VALIDATE_FLOAT', FILTER_VALIDATE_FLOAT);

$view_html .= '<p>値が float であるかどうかを検証し、成功した場合は値を float に変換します。<br>'."\n";
$view_html .= 'フィルタフラグ: カンマ (,) を数値の桁区切り文字として許可します。</p>'."\n";
$view_html .= view('FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND', FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_THOUSAND);

$view_html .= '<p>値が整数であるかどうか、オプションで指定した範囲内にあるかどうかを検証し、成功した場合は整数に変換します。</p>'."\n";
$view_html .= view('FILTER_VALIDATE_INT', FILTER_VALIDATE_INT);

$view_html .= '<p>値が整数であるかどうか、オプションで指定した範囲内にあるかどうかを検証し、成功した場合は整数に変換します。<br>'."\n";
$view_html .= 'フィルタフラグ: ゼロ (0) で始まる入力を八進数とみなします。 ゼロの後には 0-7 しか続けることができません。</p>'."\n";
$view_html .= view('FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL', FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_OCTAL);

$view_html .= '<p>値が整数であるかどうか、オプションで指定した範囲内にあるかどうかを検証し、成功した場合は整数に変換します。<br>'."\n";
$view_html .= 'フィルタフラグ: 0x あるいは 0X で始まる入力を十六進数とみなします。 後に続けられる文字は a-fA-F0-9 だけです。</p>'."\n";
$view_html .= view('FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX', FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX);

$view_html .= '<p>値が IP アドレスであるかどうかを検証します。 オプションで IPv4 あるいは IPv6 のみの指定、 プライベートアドレスや予約済みアドレスではないことの指定もできます。</p>'."\n";
$view_html .= view('FILTER_VALIDATE_IP', FILTER_VALIDATE_IP);

$view_html .= '<p>値が IP アドレスであるかどうかを検証します。 オプションで IPv4 あるいは IPv6 のみの指定、 プライベートアドレスや予約済みアドレスではないことの指定もできます。<br>'."\n";
$view_html .= 'フィルタフラグ: IPv4 形式の IP アドレスを許可します。</p>'."\n";
$view_html .= view('FILTER_VALIDATE_IP, FILTER_FLAG_IPV4', FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);

$view_html .= '<p>値が IP アドレスであるかどうかを検証します。 オプションで IPv4 あるいは IPv6 のみの指定、 プライベートアドレスや予約済みアドレスではないことの指定もできます。<br>'."\n";
$view_html .= 'フィルタフラグ: IPv6 形式の IP アドレスを許可します。</p>'."\n";
$view_html .= view('FILTER_VALIDATE_IP, FILTER_FLAG_IPV6', FILTER_VALIDATE_IP, FILTER_FLAG_IPV6);

$view_html .= '<p>値が IP アドレスであるかどうかを検証します。 オプションで IPv4 あるいは IPv6 のみの指定、 プライベートアドレスや予約済みアドレスではないことの指定もできます。<br>'."\n";
$view_html .= 'フィルタフラグ: IPv4 プライベート領域 10.0.0.0/8, 172.16.0.0/12 および 192.168.0.0/16 を許可しません。FD あるいは FC ではじまる IPv6 アドレスを許可しません。</p>'."\n";
$view_html .= view('FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE', FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE);

$view_html .= '<p>値が IP アドレスであるかどうかを検証します。 オプションで IPv4 あるいは IPv6 のみの指定、 プライベートアドレスや予約済みアドレスではないことの指定もできます。<br>'."\n";
$view_html .= 'フィルタフラグ: 予約済みの IPv4 範囲 0.0.0.0/8, 169.254.0.0/16, 127.0.0.0/8 および 240.0.0.0/4 を許可しません。予約済みの IPv6 範囲 ::1/128、::/128、 ::ffff:0:0/96 および fe80::/10 を許可しません。</p>'."\n";
$view_html .= view('FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE', FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE);

$view_html .= '<p>値が MAC アドレスであるかどうかを検証します。</p>'."\n";
$view_html .= view('FILTER_VALIDATE_MAC', FILTER_VALIDATE_MAC);

//$view_html .= '<p>値が、Perl 互換の 正規表現 regexp に一致するかどうかを検証します。</p>'."\n";
//$view_html .= view('FILTER_VALIDATE_REGEXP', FILTER_VALIDATE_REGEXP);

$view_html .= '<p>値が URL 形式である (» http://www.faqs.org/rfcs/rfc2396 に準拠している) かどうか、 オプションで、必須コンポーネントが含まれているかどうかを検証します。 妥当な URL が、HTTP プロトコル http:// を指定しているとは限りません。 つまり、その URL が期待通りのプロトコル (ssh:// や mailto: など) を使っているかどうか、さらなる検証が必要だということです。 この関数は、ASCII の URL のみを正しいとみなすことに注意しましょう。 国際化ドメイン名 (非 ASCII 文字を含むもの) は失敗します。</p>'."\n";
$view_html .= view('FILTER_VALIDATE_URL', FILTER_VALIDATE_URL);

$view_html .= '<h2>除去フィルタ</h2>'."\n";

$view_html .= '<p>英字、数字および !#$%&\'*+-=?^_`{|}~@.[] 以外のすべての文字を取り除きます。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_EMAIL', FILTER_SANITIZE_EMAIL);

$view_html .= '<p>文字列を URL エンコードします。オプションで、 特殊文字を取り除いたりエンコードしたりします。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_ENCODED', FILTER_SANITIZE_ENCODED);

$view_html .= '<p>文字列を URL エンコードします。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: コードが 32 未満の文字を除去します。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW', FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_LOW);

$view_html .= '<p>文字列を URL エンコードします。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: コードが 127 より大きい文字を除去します。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH', FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_HIGH);

$view_html .= '<p>文字列を URL エンコードします。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: バックティック文字を除去します。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK', FILTER_SANITIZE_ENCODED, FILTER_FLAG_STRIP_BACKTICK);

$view_html .= '<p>文字列を URL エンコードします。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: コードが 32 未満のすべての文字をエンコードします。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW', FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW);

$view_html .= '<p>文字列を URL エンコードします。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: コードが 127 より大きいすべての文字をエンコードします。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH', FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_HIGH);

$view_html .= '<p>addslashes() を適用します。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_MAGIC_QUOTES', FILTER_SANITIZE_MAGIC_QUOTES);

$view_html .= '<p>数字、+- および オプションで .,eE 以外のすべての文字を取り除きます。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_NUMBER_FLOAT', FILTER_SANITIZE_NUMBER_FLOAT);

$view_html .= '<p>数字、+- および オプションで .,eE 以外のすべての文字を取り除きます。<br>'."\n";
$view_html .= 'フィルタフラグ: ピリオド (.) を数値の小数点として許可します。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);

$view_html .= '<p>数字、+- および オプションで .,eE 以外のすべての文字を取り除きます。<br>'."\n";
$view_html .= 'フィルタフラグ: カンマ (,) を数値の桁区切り文字として許可します。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND);

$view_html .= '<p>数字、+- および オプションで .,eE 以外のすべての文字を取り除きます。<br>'."\n";
$view_html .= 'フィルタフラグ: e あるいは E を、 科学記法の数値として許可します。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_SCIENTIFIC);

$view_html .= '<p>数字、プラス記号、マイナス記号 以外のすべての文字を取り除きます。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_NUMBER_INT', FILTER_SANITIZE_NUMBER_INT);

$view_html .= '<p>\'"<>& および ASCII 値が 32 未満の文字を HTML エスケープします。オプションで、 特殊文字を取り除いたりエンコードしたりします。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_SPECIAL_CHARS', FILTER_SANITIZE_SPECIAL_CHARS);

$view_html .= '<p>\'"<>& および ASCII 値が 32 未満の文字を HTML エスケープします。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: コードが 32 未満の文字を除去します。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW', FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW);

$view_html .= '<p>\'"<>& および ASCII 値が 32 未満の文字を HTML エスケープします。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: コードが 127 より大きい文字を除去します。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH', FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH);

$view_html .= '<p>\'"<>& および ASCII 値が 32 未満の文字を HTML エスケープします。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: バックティック文字を除去します。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK', FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_BACKTICK);

$view_html .= '<p>\'"<>& および ASCII 値が 32 未満の文字を HTML エスケープします。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: コードが 127 より大きいすべての文字をエンコードします。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH', FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_ENCODE_HIGH);

$view_html .= '<p>htmlspecialchars() に ENT_QUOTES を指定してコールするのと同じです。 クォートのエンコードを無効にするには FILTER_FLAG_NO_ENCODE_QUOTES を設定します。 htmlspecialchars() と同様、このフィルタは default_charset に対応しています。 現在の文字セットで無効な文字となるバイトシーケンスが検出されると文字列全体を拒否し、 結果は長さ 0 の文字列となります。 このフィルタをデフォルトのフィルタとして使う場合は、以下の警告を参考にして デフォルトのフラグを 0 に設定しましょう。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_FULL_SPECIAL_CHARS', FILTER_SANITIZE_FULL_SPECIAL_CHARS);

$view_html .= '<p>htmlspecialchars() に ENT_QUOTES を指定してコールするのと同じです。 クォートのエンコードを無効にするには FILTER_FLAG_NO_ENCODE_QUOTES を設定します。 htmlspecialchars() と同様、このフィルタは default_charset に対応しています。 現在の文字セットで無効な文字となるバイトシーケンスが検出されると文字列全体を拒否し、 結果は長さ 0 の文字列となります。 このフィルタをデフォルトのフィルタとして使う場合は、以下の警告を参考にして デフォルトのフラグを 0 に設定しましょう。<br>'."\n";
$view_html .= 'フィルタフラグ: このフラグを指定すると、シングルクォート (\') およびダブルクォート (") をエンコードしません。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES);

$view_html .= '<p>タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_STRING', FILTER_SANITIZE_STRING);

$view_html .= '<p>タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: このフラグを指定すると、シングルクォート (\') およびダブルクォート (") をエンコードしません。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES', FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);

$view_html .= '<p>タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: コードが 32 未満の文字を除去します。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);

$view_html .= '<p>タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: コードが 127 より大きい文字を除去します。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);

$view_html .= '<p>タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: バックティック文字を除去します。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK);

$view_html .= '<p>タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: コードが 32 未満のすべての文字をエンコードします。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW', FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW);

$view_html .= '<p>タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: コードが 127 より大きいすべての文字をエンコードします。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH', FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH);

$view_html .= '<p>タグを取り除きます。オプションで、 特殊文字を取り除いたりエンコードしたりします。<br>'."\n";
$view_html .= 'フィルタフラグ: アンパサンド (&) をエンコードします。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP', FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP);

$view_html .= '<p>"string" フィルタのエイリアス。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_STRIPPED', FILTER_SANITIZE_STRIPPED);

$view_html .= '<p>英字、数字および $-_.+!*\'(),{}|\\^~[]`<>#%";/?:@&= 以外のすべての文字を取り除きます。</p>'."\n";
$view_html .= view('FILTER_SANITIZE_URL', FILTER_SANITIZE_URL);

$view_html .= '<p>何もせず、オプションで特殊文字を取り除いたりエンコードしたりします。 FILTER_DEFAULT は、このフィルタのエイリアスです。</p>'."\n";
$view_html .= view('FILTER_UNSAFE_RAW', FILTER_UNSAFE_RAW);

$view_html .= '<p>何もせず、オプションで特殊文字を取り除いたりエンコードしたりします。 FILTER_DEFAULT は、このフィルタのエイリアスです。<br>'."\n";
$view_html .= 'フィルタフラグ: コードが 32 未満の文字を除去します。</p>'."\n";
$view_html .= view('FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW', FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW);

$view_html .= '<p>何もせず、オプションで特殊文字を取り除いたりエンコードしたりします。 FILTER_DEFAULT は、このフィルタのエイリアスです。<br>'."\n";
$view_html .= 'フィルタフラグ: コードが 127 より大きい文字を除去します。</p>'."\n";
$view_html .= view('FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH', FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH);

$view_html .= '<p>何もせず、オプションで特殊文字を取り除いたりエンコードしたりします。 FILTER_DEFAULT は、このフィルタのエイリアスです。<br>'."\n";
$view_html .= 'フィルタフラグ: バックティック文字を除去します。</p>'."\n";
$view_html .= view('FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK', FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK);

$view_html .= '<p>何もせず、オプションで特殊文字を取り除いたりエンコードしたりします。 FILTER_DEFAULT は、このフィルタのエイリアスです。<br>'."\n";
$view_html .= 'フィルタフラグ: コードが 32 未満のすべての文字をエンコードします。</p>'."\n";
$view_html .= view('FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW', FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW);

$view_html .= '<p>何もせず、オプションで特殊文字を取り除いたりエンコードしたりします。 FILTER_DEFAULT は、このフィルタのエイリアスです。<br>'."\n";
$view_html .= 'フィルタフラグ: コードが 127 より大きいすべての文字をエンコードします。</p>'."\n";
$view_html .= view('FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH', FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_HIGH);

$view_html .= '<p>何もせず、オプションで特殊文字を取り除いたりエンコードしたりします。 FILTER_DEFAULT は、このフィルタのエイリアスです。<br>'."\n";
$view_html .= 'フィルタフラグ: アンパサンド (&) をエンコードします。</p>'."\n";
$view_html .= view('FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP', FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP);

HTML

<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>filter_input - PHPテストデータ一覧 - テストデータを入れてみました</title>
<style type="text/css">
html {
	font-family: "メイリオ", Meiryo, Osaka, "MS Pゴシック", "MS PGothic", sans-serif;
	font-size: 100%;
	font-size: 62.5%;
}
body {
	font-size: 1.4em;
}

#sideColumn{
	display: none;
}
.layout1 #mainColumn {
    width: 100%;
}
#post-wrapper {
    width: 100%;
}
.post {
    width: 95%;
}

#data h2:before {
	content: '■ ';
}
#data p:before {
	content: '▼ ';
}
#data th {
	background-color: #ffcc66;
}
#data td {
	padding: 0 10px;
	word-break: break-all;
}
footer {
	margin: 100px 0 20px;
	text-align: center;
}
</style>
</head>

<body>
<article>
	<h1>filter_input - PHPテストデータ一覧 - テストデータを入れてみました</h1>
	<p>PHPのfilter_inputのテストデータを入れて検証を行いました。検証フィルタ、除去フィルタ、フィルタフラグのテストを行いました。</p>
	<p>表の見方は、左から、「フィルター」「テストする値」「フィルターの結果」になります。<br>
	「フィルタフラグ」がある場合は、フィルターの後にカンマで続けて記載しております。</p>
	<div id="data">
		<?php echo $view_html; ?>
	</div>
</article>
<footer>
	<span>&copy; 2016 UNS.</span>
</footer>
</body>
</html>

関連記事

コメント

  • トラックバックは利用できません。

  • コメント (0)

  1. この記事へのコメントはありません。