[DOC-CVS] [doc-en] master: mb-strpos.xml Use parameter names instead of types, fix typos and XML syntax (#4964)

[email protected] (Mikhail Alferov via GitHub)
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Mikhail Alferov (mmalferov)
Committer: GitHub (web-flow)
Pusher: kamil-tekiela
Date: 2025-10-31T15:33:32Z

Commit: https://github.com/php/doc-en/commit/95d05546430b9e5db225dd42a0d285b870f0da42
Raw diff: https://github.com/php/doc-en/commit/95d05546430b9e5db225dd42a0d285b870f0da42.diff

mb-strpos.xml Use parameter names instead of types, fix typos and XML syntax (#4964)

Changed paths:
  M  reference/mbstring/functions/mb-stripos.xml
  M  reference/mbstring/functions/mb-stristr.xml
  M  reference/mbstring/functions/mb-strpos.xml
  M  reference/mbstring/functions/mb-strrchr.xml
  M  reference/mbstring/functions/mb-strrichr.xml
  M  reference/mbstring/functions/mb-strripos.xml
  M  reference/mbstring/functions/mb-strrpos.xml
  M  reference/mbstring/functions/mb-strstr.xml
  M  reference/strings/functions/strripos.xml


Diff:

diff --git a/reference/mbstring/functions/mb-stripos.xml b/reference/mbstring/functions/mb-stripos.xml
index 192ea0a092e6..a9dd671e9b54 100644
--- a/reference/mbstring/functions/mb-stripos.xml
+++ b/reference/mbstring/functions/mb-stripos.xml
@@ -58,10 +58,7 @@
     <varlistentry>
      <term><parameter>encoding</parameter></term>
      <listitem>
-      <para>
-       Character encoding name to use.
-       If it is omitted, internal character encoding is used.
-      </para>
+      &mbstring.encoding.parameter;
      </listitem>
     </varlistentry>
    </variablelist>
diff --git a/reference/mbstring/functions/mb-stristr.xml b/reference/mbstring/functions/mb-stristr.xml
index 2b38933f5471..f0f723e0ca44 100644
--- a/reference/mbstring/functions/mb-stristr.xml
+++ b/reference/mbstring/functions/mb-stristr.xml
@@ -61,10 +61,7 @@
     <varlistentry>
      <term><parameter>encoding</parameter></term>
      <listitem>
-      <para>
-       Character encoding name to use.
-       If it is omitted, internal character encoding is used.
-      </para>
+      &mbstring.encoding.parameter;
      </listitem>
     </varlistentry>
    </variablelist>
diff --git a/reference/mbstring/functions/mb-strpos.xml b/reference/mbstring/functions/mb-strpos.xml
index b7ec05bd9056..21f72bb86fbd 100644
--- a/reference/mbstring/functions/mb-strpos.xml
+++ b/reference/mbstring/functions/mb-strpos.xml
@@ -16,7 +16,7 @@
    <methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
   </methodsynopsis>
   <para>
-   Finds position of the first occurrence of a <type>string</type> in a <type>string</type>.
+   Finds position of the first occurrence of <parameter>needle</parameter> in the <parameter>haystack</parameter> string.
   </para>
   <para>
    Performs a multi-byte safe
@@ -34,7 +34,8 @@
      <term><parameter>haystack</parameter></term>
      <listitem>
       <para>
-       The <type>string</type> being checked.
+       The string from which to get the position of the first occurrence
+       of <parameter>needle</parameter>.
       </para>
      </listitem>
     </varlistentry>
diff --git a/reference/mbstring/functions/mb-strrchr.xml b/reference/mbstring/functions/mb-strrchr.xml
index edeccbe80815..0a2d4ef8d6cc 100644
--- a/reference/mbstring/functions/mb-strrchr.xml
+++ b/reference/mbstring/functions/mb-strrchr.xml
@@ -59,10 +59,7 @@
     <varlistentry>
      <term><parameter>encoding</parameter></term>
      <listitem>
-      <para>
-       Character encoding name to use.
-       If it is omitted, internal character encoding is used.
-      </para>
+      &mbstring.encoding.parameter;
      </listitem>
     </varlistentry>
    </variablelist>
diff --git a/reference/mbstring/functions/mb-strrichr.xml b/reference/mbstring/functions/mb-strrichr.xml
index 4c6927218799..c0cfba09cdf9 100644
--- a/reference/mbstring/functions/mb-strrichr.xml
+++ b/reference/mbstring/functions/mb-strrichr.xml
@@ -61,10 +61,7 @@
     <varlistentry>
      <term><parameter>encoding</parameter></term>
      <listitem>
-      <para>
-       Character encoding name to use.
-       If it is omitted, internal character encoding is used.
-      </para>
+      &mbstring.encoding.parameter;
      </listitem>
     </varlistentry>
    </variablelist>
diff --git a/reference/mbstring/functions/mb-strripos.xml b/reference/mbstring/functions/mb-strripos.xml
index 2f4ae89dc2c2..fafd473fd739 100644
--- a/reference/mbstring/functions/mb-strripos.xml
+++ b/reference/mbstring/functions/mb-strripos.xml
@@ -35,7 +35,7 @@
      <listitem>
       <para>
        The string from which to get the position of the last occurrence
-       of <parameter>needle</parameter>
+       of <parameter>needle</parameter>.
       </para>
      </listitem>
     </varlistentry>
@@ -43,7 +43,7 @@
      <term><parameter>needle</parameter></term>
      <listitem>
       <para>
-       The string to find in <parameter>haystack</parameter>
+       The string to find in <parameter>haystack</parameter>.
       </para>
      </listitem>
     </varlistentry>
@@ -51,18 +51,16 @@
      <term><parameter>offset</parameter></term>
      <listitem>
       <para>
-       The position in <parameter>haystack</parameter>
-       to start searching
+       May be specified to begin searching an arbitrary number of characters into
+       the <parameter>haystack</parameter>. Negative values will stop searching at an arbitrary point
+       prior to the end of the <parameter>haystack</parameter>.
       </para>
      </listitem>
     </varlistentry>
     <varlistentry>
      <term><parameter>encoding</parameter></term>
      <listitem>
-      <para>
-       Character encoding name to use.
-       If it is omitted, internal character encoding is used.
-      </para>
+      &mbstring.encoding.parameter;
      </listitem>
     </varlistentry>
    </variablelist>
diff --git a/reference/mbstring/functions/mb-strrpos.xml b/reference/mbstring/functions/mb-strrpos.xml
index 656a4d7b0601..5dd807f62865 100644
--- a/reference/mbstring/functions/mb-strrpos.xml
+++ b/reference/mbstring/functions/mb-strrpos.xml
@@ -51,8 +51,8 @@
      <listitem>
       <simpara>
        May be specified to begin searching an arbitrary number of characters into
-       the <type>string</type>.  Negative values will stop searching at an arbitrary point
-       prior to the end of the <type>string</type>.
+       the <parameter>haystack</parameter>. Negative values will stop searching at an arbitrary point
+       prior to the end of the <parameter>haystack</parameter>.
       </simpara>
      </listitem>
     </varlistentry>
@@ -105,7 +105,7 @@
       <entry>8.0.0</entry>
       <entry>
        Passing the <parameter>encoding</parameter> as the third argument 
-       instead of an offset has been removed.
+       instead of an <parameter>offset</parameter> has been removed.
       </entry>
      </row>
      &mbstring.changelog.encoding-nullable;
diff --git a/reference/mbstring/functions/mb-strstr.xml b/reference/mbstring/functions/mb-strstr.xml
index aa06a06092e3..230a367c7d9c 100644
--- a/reference/mbstring/functions/mb-strstr.xml
+++ b/reference/mbstring/functions/mb-strstr.xml
@@ -59,10 +59,7 @@
     <varlistentry>
      <term><parameter>encoding</parameter></term>
      <listitem>
-      <para>
-       Character encoding name to use.
-       If it is omitted, internal character encoding is used.
-      </para>
+      &mbstring.encoding.parameter;
      </listitem>
     </varlistentry>
    </variablelist>
diff --git a/reference/strings/functions/strripos.xml b/reference/strings/functions/strripos.xml
index 3b069b67eb14..44a249281e62 100644
--- a/reference/strings/functions/strripos.xml
+++ b/reference/strings/functions/strripos.xml
@@ -5,7 +5,7 @@
   <refname>strripos</refname>
   <refpurpose>Find the position of the last occurrence of a case-insensitive substring in a string</refpurpose>
  </refnamediv>
- 
+
  <refsect1 role="description">
   &reftitle.description;
   <methodsynopsis>
@@ -18,7 +18,7 @@
    Find the numeric position of the last occurrence of
    <parameter>needle</parameter> in the <parameter>haystack</parameter> string.
   </para>
-  <para> 
+  <para>
    Unlike the <function>strrpos</function>, <function>strripos</function> is
    case-insensitive.
   </para>
@@ -48,7 +48,7 @@
     <varlistentry>
      <term><parameter>offset</parameter></term>
      <listitem>
-      <para> 
+      <para>
        If zero or positive, the search is performed left to right skipping the
        first <parameter>offset</parameter> bytes of the
        <parameter>haystack</parameter>.
@@ -75,9 +75,9 @@
  <refsect1 role="returnvalues">
   &reftitle.returnvalues;
   <para>
-   Returns the position where the needle exists relative to the beginnning of
+   Returns the position where the <parameter>needle</parameter> exists relative to the beginning of
    the <parameter>haystack</parameter> string (independent of search direction
-   or offset).
+   or <parameter>offset</parameter>).
    <note>
     <simpara>
      String positions start at 0, and not 1.
@@ -85,7 +85,7 @@
    </note>
   </para>
   <para>
-   Returns &false; if the needle was not found.
+   Returns &false; if the <parameter>needle</parameter> was not found.
   </para>
   &return.falseproblem;
  </refsect1>
@@ -141,25 +141,27 @@
     <programlisting role="php">
 <![CDATA[
 <?php
+
 $haystack = 'ababcd';
 $needle   = 'aB';
 
 $pos      = strripos($haystack, $needle);
 
 if ($pos === false) {
-    echo "Sorry, we did not find ($needle) in ($haystack)";
+    echo "Sorry, we did not find `$needle` in `$haystack`";
 } else {
     echo "Congratulations!\n";
-    echo "We found the last ($needle) in ($haystack) at position ($pos)";
+    echo "We found the last `$needle` in `$haystack` at position `$pos`";
 }
+
 ?>
 ]]>
     </programlisting>
     &example.outputs;
     <screen>
 <![CDATA[
-   Congratulations!
-   We found the last (aB) in (ababcd) at position (2)
+Congratulations!
+We found the last `aB` in `ababcd` at position `2`
 ]]>
     </screen>
    </example>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.