svn: /phpdoc/ja/trunk/reference/strings/functions/ strip-tags.xml

From: Date: Fri, 06 Mar 2020 01:48:23 +0000
Subject: svn: /phpdoc/ja/trunk/reference/strings/functions/ strip-tags.xml
Groups: php.doc.ja 
Request: Send a blank email to doc-ja+get-5524@lists.php.net to get a copy of this message
mumumu Fri, 06 Mar 2020 01:48:23 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=349325 Log: stip_tags() accepts array for $allowable_tags as of PHP 7.4.0 This integrates user note 124799. Changed paths: U phpdoc/ja/trunk/reference/strings/functions/strip-tags.xml Modified: phpdoc/ja/trunk/reference/strings/functions/strip-tags.xml =================================================================== --- phpdoc/ja/trunk/reference/strings/functions/strip-tags.xml 2020-03-06 00:09:07 UTC (rev 349324) +++ phpdoc/ja/trunk/reference/strings/functions/strip-tags.xml 2020-03-06 01:48:23 UTC (rev 349325) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 348925 Maintainer: hirokawa Status: ready --> +<!-- EN-Revision: 349323 Maintainer: hirokawa Status: ready --> <!-- CREDITS: shimooka,mumumu --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strip-tags"> <refnamediv> @@ -13,7 +13,7 @@ <methodsynopsis> <type>string</type><methodname>strip_tags</methodname> <methodparam><type>string</type><parameter>str</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>allowable_tags</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>allowable_tags</parameter></methodparam> </methodsynopsis> <para> この関数は、指定した文字列 (<parameter>str</parameter>) @@ -39,6 +39,8 @@ <listitem> <para> オプションの2番目の引数により、取り除かないタグを指定できます。 + これは &string; で指定できますが、PHP 7.4.0 以降では &array; でも指定可能です。 + この引数のフォーマットについては、以下の例を参照して下さい。 </para> <note> <para> @@ -89,6 +91,12 @@ </thead> <tbody> <row> + <entry>7.4.0</entry> + <entry> + <parameter>allowable_tags</parameter> は、&array; も受け入れるようになりました。 + </entry> + </row> + <row> <entry>5.3.4</entry> <entry> <function>strip_tags</function> は、 @@ -115,6 +123,9 @@ // <p> と <a> は許可します echo strip_tags($text, '<p><a>'); + +// PHP 7.4.0 以降では、上の行は以下のように書けます: +// echo strip_tags($text, ['p', 'a']); ?> ]]> </programlisting>

« previous php.doc.ja (#5524) next »