diff --git a/reference/strings/functions/str-contains.xml b/reference/strings/functions/str-contains.xml
index 0bed156aa2..7ab3098b75 100644
--- a/reference/strings/functions/str-contains.xml
+++ b/reference/strings/functions/str-contains.xml
@@ -81,7 +81,7 @@ Checking the existence of the empty string will always return true
$string = 'The lazy fox jumped over the fence';
if (str_contains($string, 'lazy')) {
- echo "The string "lazy" was found in the string\n";
+ echo "The string 'lazy' was found in the string\n";
}
if (str_contains($string, 'Lazy')) {
@@ -96,7 +96,7 @@ if (str_contains($string, 'Lazy')) {
&example.outputs;
@@ -113,6 +113,8 @@ The string "lazy" was found in the string
&reftitle.seealso;
+ str_ends_with
+ str_starts_with
stripos
strrpos
strripos
diff --git a/reference/strings/functions/str-ends-with.xml b/reference/strings/functions/str-ends-with.xml
new file mode 100644
index 0000000000..5008bb098d
--- /dev/null
+++ b/reference/strings/functions/str-ends-with.xml
@@ -0,0 +1,150 @@
+
+
+
+
+ str_ends_with
+ Checks if a string ends with a given substring
+
+
+
+ &reftitle.description;
+
+ boolstr_ends_with
+ stringhaystack
+ stringneedle
+
+
+ Performs a case-sensitive check indicating if
+ haystack ends with needle.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ haystack
+
+
+ The string to search in.
+
+
+
+
+ needle
+
+
+ The substring to search for in the haystack.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ Returns &true; if haystack ends with
+ needle, &false; otherwise.
+
+
+
+
+ &reftitle.examples;
+
+
+ Using the empty string ''
+
+
+]]>
+
+ &example.outputs;
+
+
+
+
+
+
+ Showing case-sensitivity
+
+
+]]>
+
+ &example.outputs;
+
+
+
+
+
+
+
+
+ &reftitle.notes;
+ ¬e.bin-safe;
+
+
+
+ &reftitle.seealso;
+
+
+ str_contains
+ str_starts_with
+ stripos
+ strrpos
+ strripos
+ strstr
+ strpbrk
+ substr
+ preg_match
+
+
+
+
+
+
+
diff --git a/reference/strings/functions/str-starts-with.xml b/reference/strings/functions/str-starts-with.xml
new file mode 100644
index 0000000000..fe84cc2c77
--- /dev/null
+++ b/reference/strings/functions/str-starts-with.xml
@@ -0,0 +1,150 @@
+
+
+
+
+ str_starts_with
+ Checks if a string starts with a given substring
+
+
+
+ &reftitle.description;
+
+ boolstr_starts_with
+ stringhaystack
+ stringneedle
+
+
+ Performs a case-sensitive check indicating if
+ haystack begins with needle.
+
+
+
+
+ &reftitle.parameters;
+
+
+
+ haystack
+
+
+ The string to search in.
+
+
+
+
+ needle
+
+
+ The substring to search for in the haystack.
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ Returns &true; if haystack begins with
+ needle, &false; otherwise.
+
+
+
+
+ &reftitle.examples;
+
+
+ Using the empty string ''
+
+
+]]>
+
+ &example.outputs;
+
+
+
+
+
+
+ Showing case-sensitivity
+
+
+]]>
+
+ &example.outputs;
+
+
+
+
+
+
+
+
+ &reftitle.notes;
+ ¬e.bin-safe;
+
+
+
+ &reftitle.seealso;
+
+
+ str_contains
+ str_ends_with
+ stripos
+ strrpos
+ strripos
+ strstr
+ strpbrk
+ substr
+ preg_match
+
+
+
+
+
+
+
diff --git a/reference/strings/functions/stripos.xml b/reference/strings/functions/stripos.xml
index 3748ffda63..6e5193c37d 100644
--- a/reference/strings/functions/stripos.xml
+++ b/reference/strings/functions/stripos.xml
@@ -144,6 +144,8 @@ if ($pos2 !== false) {
mb_stripos
str_contains
+ str_ends_with
+ str_starts_with
strpos
strrpos
strripos
diff --git a/reference/strings/functions/strpos.xml b/reference/strings/functions/strpos.xml
index 3fd328ab29..9aa94c5a22 100644
--- a/reference/strings/functions/strpos.xml
+++ b/reference/strings/functions/strpos.xml
@@ -167,6 +167,8 @@ $pos = strpos($newstring, 'a', 1); // $pos = 7, not 0
stripos
str_contains
+ str_ends_with
+ str_starts_with
strrpos
strripos
strstr
diff --git a/reference/strings/versions.xml b/reference/strings/versions.xml
index 21445f0788..d04b0b7896 100644
--- a/reference/strings/versions.xml
+++ b/reference/strings/versions.xml
@@ -56,6 +56,7 @@
+
@@ -64,6 +65,7 @@
+