]> granicus.if.org Git - php/commitdiff
- MFH: Refix bug #43840.
authorMoriyoshi Koizumi <moriyoshi@php.net>
Sun, 15 Feb 2009 07:11:23 +0000 (07:11 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Sun, 15 Feb 2009 07:11:23 +0000 (07:11 +0000)
- MFH: Fix bug #43841.
- MFH: Remove redundant trailing dots from the error messages.
- MFH: Fix tests.

16 files changed:
ext/mbstring/libmbfl/mbfl/mbfilter.c
ext/mbstring/mbstring.c
ext/mbstring/tests/bug43840.phpt
ext/mbstring/tests/bug43841.phpt
ext/mbstring/tests/mb_stripos_variation3.phpt
ext/mbstring/tests/mb_stripos_variation5_Bug45923.phpt
ext/mbstring/tests/mb_strpos_variation2.phpt
ext/mbstring/tests/mb_strpos_variation3.phpt
ext/mbstring/tests/mb_strpos_variation5.phpt
ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt
ext/mbstring/tests/mb_strripos_variation5_Bug45923.phpt
ext/mbstring/tests/mb_strrpos_variation3.phpt
ext/standard/tests/strings/bug40754.phpt
ext/standard/tests/strings/strripos_offset.phpt
ext/standard/tests/strings/strrpos_variation14.phpt
ext/standard/tests/strings/strrpos_variation15.phpt

index 646912ad16cbcc1366e324dc91c1d4f4f24e0b9d..1aeb38cc9b7ddcec3d3961a762ec1819e1d26dc0 100644 (file)
@@ -778,7 +778,7 @@ retry:
                        for (;;) {
                                pc->found_pos++;
                                p = h;
-                               m = pc->needle.buffer;
+                               m = (int *)pc->needle.buffer;
                                n = pc->needle_pos - 1;
                                while (n > 0 && *p == *m) {
                                        n--;
@@ -857,87 +857,203 @@ mbfl_strpos(
     int offset,
     int reverse)
 {
-       int n, result, negative_offset = 0;
-       unsigned char *p;
-       mbfl_convert_filter *filter;
-       struct collector_strpos_data pc;
+       int result;
+       mbfl_string _haystack_u8, _needle_u8;
+       const mbfl_string *haystack_u8, *needle_u8;
+       const unsigned char *u8_tbl;
 
-       if (haystack == NULL || needle == NULL) {
+       if (haystack == NULL || haystack->val == NULL || needle == NULL || needle->val == NULL) {
                return -8;
        }
-       /* needle is converted into wchar */
-       mbfl_wchar_device_init(&pc.needle);
-       filter = mbfl_convert_filter_new(
-         needle->no_encoding,
-         mbfl_no_encoding_wchar,
-         mbfl_wchar_device_output, 0, &pc.needle);
-       if (filter == NULL) {
-               return -4;
-       }
-       p = needle->val;
-       n = needle->len;
-       if (p != NULL) {
-               while (n > 0) {
-                       if ((*filter->filter_function)(*p++, filter) < 0) {
-                               break;
-                       }
-                       n--;
+
+       {
+               const mbfl_encoding *u8_enc;
+               u8_enc = mbfl_no2encoding(mbfl_no_encoding_utf8);
+               if (u8_enc == NULL || u8_enc->mblen_table == NULL) {
+                       return -8;
                }
+               u8_tbl = u8_enc->mblen_table;
        }
-       mbfl_convert_filter_flush(filter);
-       mbfl_convert_filter_delete(filter);
-       pc.needle_len = pc.needle.pos;
-       if (pc.needle.buffer == NULL) {
-               return -4;
-       }
-       if (pc.needle_len <= 0) {
-               mbfl_wchar_device_clear(&pc.needle);
-               return -2;
-       }
-       /* initialize filter and collector data */
-       filter = mbfl_convert_filter_new(
-         haystack->no_encoding,
-         mbfl_no_encoding_wchar,
-         collector_strpos, 0, &pc);
-       if (filter == NULL) {
-               mbfl_wchar_device_clear(&pc.needle);
-               return -4;
+
+       if (haystack->no_encoding != mbfl_no_encoding_utf8) {
+               mbfl_string_init(&_haystack_u8);
+               haystack_u8 = mbfl_convert_encoding(haystack, &_haystack_u8, mbfl_no_encoding_utf8);
+               if (haystack_u8 == NULL) {
+                       result = -4;
+                       goto out;
+               }
+       } else {
+               haystack_u8 = haystack;
        }
 
-       if (offset < 0) {
-               negative_offset = -offset - pc.needle_len;
-               if (negative_offset < 0) {
-                       negative_offset = 0;
+       if (needle->no_encoding != mbfl_no_encoding_utf8) {
+               mbfl_string_init(&_needle_u8);
+               needle_u8 = mbfl_convert_encoding(needle, &_needle_u8, mbfl_no_encoding_utf8);
+               if (needle_u8 == NULL) {
+                       result = -4;
+                       goto out;
                }
-               offset = 0;
+       } else {
+               needle_u8 = needle;
        }
 
-       pc.start = offset;
-       pc.output = 0;
-       pc.needle_pos = 0;
-       pc.found_pos = 0;
-       pc.matched_pos = -1;
+       if (needle_u8->len < 1) {
+               result = -8;
+               goto out;
+       }
 
-       /* feed data */
-       p = haystack->val;
-       n = haystack->len - negative_offset;
-       if (p != NULL) {
-               while (n > 0) {
-                       if ((*filter->filter_function)(*p++, filter) < 0) {
-                               pc.matched_pos = -4;
-                               break;
+       result = -1;
+       if (haystack_u8->len < needle_u8->len) {
+               goto out;
+       }
+
+       if (!reverse) {
+               unsigned int jtbl[1 << (sizeof(unsigned char) * 8)];
+               unsigned int needle_u8_len = needle_u8->len;
+               unsigned int i;
+               const unsigned char *p, *q, *e;
+               const unsigned char *haystack_u8_val = haystack_u8->val,
+                                   *needle_u8_val = needle_u8->val;
+               for (i = 0; i < sizeof(jtbl) / sizeof(*jtbl); ++i) {
+                       jtbl[i] = needle_u8_len + 1;
+               }
+               for (i = 0; i < needle_u8_len - 1; ++i) {
+                       jtbl[needle_u8_val[i]] = needle_u8_len - i;
+               }
+               e = haystack_u8_val + haystack_u8->len;
+               p = haystack_u8_val;
+               while (--offset >= 0) {
+                       if (p >= e) {
+                               result = -16;
+                               goto out;
                        }
-                       if (pc.matched_pos >= 0 && !reverse) {
-                               break;
+                       p += u8_tbl[*p];
+               }
+               p += needle_u8_len;
+               if (p > e) {
+                       goto out;
+               }
+               while (p <= e) {
+                       const unsigned char *pv = p;
+                       q = needle_u8_val + needle_u8_len;
+                       for (;;) {
+                               if (q == needle_u8_val) {
+                                       result = 0;
+                                       while (p > haystack_u8_val) {
+                                               unsigned char c = *--p;
+                                               if (c < 0x80) {
+                                                       ++result;
+                                               } else if ((c & 0xc0) != 0x80) {
+                                                       ++result;
+                                               }       
+                                       }
+                                       goto out;
+                               }
+                               if (*--q != *--p) {
+                                       break;
+                               }
+                       }
+                       p += jtbl[*p];
+                       if (p <= pv) {
+                               p = pv + 1;
+                       }
+               }
+       } else {
+               unsigned int jtbl[1 << (sizeof(unsigned char) * 8)];
+               unsigned int needle_u8_len = needle_u8->len, needle_len = 0;
+               unsigned int i;
+               const unsigned char *p, *e, *q, *qe;
+               const unsigned char *haystack_u8_val = haystack_u8->val,
+                                   *needle_u8_val = needle_u8->val;
+               for (i = 0; i < sizeof(jtbl) / sizeof(*jtbl); ++i) {
+                       jtbl[i] = needle_u8_len;
+               }
+               for (i = needle_u8_len - 1; i > 0; --i) {
+                       unsigned char c = needle_u8_val[i];
+                       jtbl[c] = i;
+                       if (c < 0x80) {
+                               ++needle_len;
+                       } else if ((c & 0xc0) != 0x80) {
+                               ++needle_len;
+                       }
+               }
+               {
+                       unsigned char c = needle_u8_val[0];
+                       if (c < 0x80) {
+                               ++needle_len;
+                       } else if ((c & 0xc0) != 0x80) {
+                               ++needle_len;
+                       }
+               }
+               e = haystack_u8_val;
+               p = e + haystack_u8->len;
+               qe = needle_u8_val + needle_u8_len;
+               if (offset < 0) {
+                       if (-offset > needle_len) {
+                               offset += needle_len; 
+                               while (offset < 0) {
+                                       unsigned char c;
+                                       if (p <= e) {
+                                               result = -16;
+                                               goto out;
+                                       }
+                                       c = *(--p);
+                                       if (c < 0x80) {
+                                               ++offset;
+                                       } else if ((c & 0xc0) != 0x80) {
+                                               ++offset;
+                                       }
+                               }
+                       }
+               } else {
+                       const unsigned char *ee = haystack_u8_val + haystack_u8->len;
+                       while (--offset >= 0) {
+                               if (e >= ee) {
+                                       result = -16;
+                                       goto out;
+                               }
+                               e += u8_tbl[*e];
+                       }
+               }
+               if (p < e + needle_u8_len) {
+                       goto out;
+               }
+               p -= needle_u8_len;
+               while (p >= e) {
+                       const unsigned char *pv = p;
+                       q = needle_u8_val;
+                       for (;;) {
+                               if (q == qe) {
+                                       result = 0;
+                                       p -= needle_u8_len;
+                                       while (p > haystack_u8_val) {
+                                               unsigned char c = *--p;
+                                               if (c < 0x80) {
+                                                       ++result;
+                                               } else if ((c & 0xc0) != 0x80) {
+                                                       ++result;
+                                               }       
+                                       }
+                                       goto out;
+                               }
+                               if (*q != *p) {
+                                       break;
+                               }
+                               ++p, ++q;
+                       }
+                       p -= jtbl[*p];
+                       if (p >= pv) {
+                               p = pv - 1;
                        }
-                       n--;
                }
        }
-       mbfl_convert_filter_flush(filter);
-       result = pc.matched_pos;
-       mbfl_convert_filter_delete(filter);
-       mbfl_wchar_device_clear(&pc.needle);
-
+out:
+       if (haystack_u8 == &_haystack_u8) {
+               mbfl_string_clear(&_haystack_u8);
+       }
+       if (needle_u8 == &_needle_u8) {
+               mbfl_string_clear(&_needle_u8);
+       }
        return result;
 }
 
index b1011da945ef80f9b19c99d43b4dce984507fc7e..ec3b1d0690bf275eb138bab9e0a1153557cc93ea 100644 (file)
@@ -1867,7 +1867,7 @@ PHP_FUNCTION(mb_strstr)
        }
 
        if (needle.len <= 0) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING,"Empty delimiter.");
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter");
                RETURN_FALSE;
        }
        n = mbfl_strpos(&haystack, &needle, 0, 0);
@@ -1976,7 +1976,7 @@ PHP_FUNCTION(mb_stristr)
        }
 
        if(!needle.len){
-               php_error_docref(NULL TSRMLS_CC, E_WARNING,"Empty delimiter.");
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter");
                RETURN_FALSE;
        }
 
@@ -2095,7 +2095,7 @@ PHP_FUNCTION(mb_substr_count)
        }
 
        if (needle.len <= 0) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING,"Empty substring.");
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty substring");
                RETURN_FALSE;
        }
 
index f32533e30e8bd9e916443f0b6243b22ee909de9f..626cd70f8f2c05f3e5129b0e988a9ae32397fabc 100644 (file)
@@ -47,29 +47,29 @@ bool(false)
 -- Offset is 22 --
 --Multibyte String:--
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 --ASCII String:--
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 
 -- Offset is 53 --
 --Multibyte String:--
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 --ASCII String:--
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 
 -- Offset is 54 --
 --Multibyte String:--
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 --ASCII String:--
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
-bool(false)
\ No newline at end of file
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
+bool(false)
index 098d267bf22ef9d32d1ad06148671ad3b3bc6cd9..9f2583286c523edb44e82bf8efa13c084d30a8a0 100644 (file)
@@ -1,6 +1,5 @@
 --TEST--
 Test mb_strrpos() function : mb_strrpos offset is byte count for negative values
---XFAIL--
 --SKIPIF--
 <?php
 extension_loaded('mbstring') or die('skip');
@@ -40,31 +39,31 @@ foreach ($offsets as $i) {
 -- Offset is -25 --
 Multibyte String:
 
-Notice: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 ASCII String:
 mb_strrpos:
 
-Notice: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 strrpos:
 
-Notice: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
 -- Offset is -24 --
 Multibyte String:
 
-Notice: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 ASCII String:
 mb_strrpos:
 
-Notice: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 strrpos:
 
-Notice: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
 -- Offset is -13 --
index 6703c983a62855eba94625920d134bdad668ab76..41a365abfd7a415548e2de8faac9fc7ecc2fa686 100644 (file)
@@ -115,12 +115,12 @@ int(8)
 
 -- Iteration 3 --
 
-Warning: mb_stripos(): Offset not contained in string. in %s on line %d
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
 bool(false)
 
 -- Iteration 4 --
 
-Warning: mb_stripos(): Offset not contained in string. in %s on line %d
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
 bool(false)
 
 -- Iteration 5 --
@@ -128,12 +128,12 @@ bool(false)
 
 -- Iteration 6 --
 
-Warning: mb_stripos(): Offset not contained in string. in %s on line %d
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
 bool(false)
 
 -- Iteration 7 --
 
-Warning: mb_stripos(): Offset not contained in string. in %s on line %d
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
 bool(false)
 
 -- Iteration 8 --
@@ -200,4 +200,4 @@ int(8)
 
 Warning: mb_stripos() expects parameter 3 to be long, resource given in %s on line %d
 bool(false)
-Done
\ No newline at end of file
+Done
index 73980f9700f9b4663cce6c7706595de7d7e163ce..134a4c3ecf8ae9d945031436d834e865274976ac 100644 (file)
@@ -52,11 +52,11 @@ echo "Done";
 **-- Offset is: -10 --**
 -- ASCII String --
 
-Warning: mb_stripos(): Offset not contained in string. in %s on line %d
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
 bool(false)
 --Multibyte String --
 
-Warning: mb_stripos(): Offset not contained in string. in %s on line %d
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
 bool(false)
 
 **-- Offset is: 0 --**
@@ -80,40 +80,40 @@ int(20)
 **-- Offset is: 30 --**
 -- ASCII String --
 
-Warning: mb_stripos(): Offset not contained in string. in %s on line %d
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
 bool(false)
 --Multibyte String --
 
-Warning: mb_stripos(): Offset not contained in string. in %s on line %d
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
 bool(false)
 
 **-- Offset is: 40 --**
 -- ASCII String --
 
-Warning: mb_stripos(): Offset not contained in string. in %s on line %d
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
 bool(false)
 --Multibyte String --
 
-Warning: mb_stripos(): Offset not contained in string. in %s on line %d
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
 bool(false)
 
 **-- Offset is: 50 --**
 -- ASCII String --
 
-Warning: mb_stripos(): Offset not contained in string. in %s on line %d
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
 bool(false)
 --Multibyte String --
 
-Warning: mb_stripos(): Offset not contained in string. in %s on line %d
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
 bool(false)
 
 **-- Offset is: 60 --**
 -- ASCII String --
 
-Warning: mb_stripos(): Offset not contained in string. in %s on line %d
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
 bool(false)
 --Multibyte String --
 
-Warning: mb_stripos(): Offset not contained in string. in %s on line %d
+Warning: mb_stripos(): Offset not contained in string in %s on line %d
 bool(false)
-Done
\ No newline at end of file
+Done
index b2263023af929e79579389a63fc1495f402bce29..d6feb492316c0ab7dc74c0dc4ab7efcf3286acca 100644 (file)
@@ -135,12 +135,12 @@ bool(false)
 
 -- Iteration 10 --
 
-Warning: mb_strpos(): Empty delimiter. in %s on line %d
+Warning: mb_strpos(): Empty delimiter in %s on line %d
 bool(false)
 
 -- Iteration 11 --
 
-Warning: mb_strpos(): Empty delimiter. in %s on line %d
+Warning: mb_strpos(): Empty delimiter in %s on line %d
 bool(false)
 
 -- Iteration 12 --
@@ -148,7 +148,7 @@ bool(false)
 
 -- Iteration 13 --
 
-Warning: mb_strpos(): Empty delimiter. in %s on line %d
+Warning: mb_strpos(): Empty delimiter in %s on line %d
 bool(false)
 
 -- Iteration 14 --
@@ -156,17 +156,17 @@ bool(false)
 
 -- Iteration 15 --
 
-Warning: mb_strpos(): Empty delimiter. in %s on line %d
+Warning: mb_strpos(): Empty delimiter in %s on line %d
 bool(false)
 
 -- Iteration 16 --
 
-Warning: mb_strpos(): Empty delimiter. in %s on line %d
+Warning: mb_strpos(): Empty delimiter in %s on line %d
 bool(false)
 
 -- Iteration 17 --
 
-Warning: mb_strpos(): Empty delimiter. in %s on line %d
+Warning: mb_strpos(): Empty delimiter in %s on line %d
 bool(false)
 
 -- Iteration 18 --
@@ -183,16 +183,16 @@ bool(false)
 
 -- Iteration 22 --
 
-Warning: mb_strpos(): Empty delimiter. in %s on line %d
+Warning: mb_strpos(): Empty delimiter in %s on line %d
 bool(false)
 
 -- Iteration 23 --
 
-Warning: mb_strpos(): Empty delimiter. in %s on line %d
+Warning: mb_strpos(): Empty delimiter in %s on line %d
 bool(false)
 
 -- Iteration 24 --
 
 Warning: mb_strpos() expects parameter 2 to be string, resource given in %s on line %d
 bool(false)
-Done
\ No newline at end of file
+Done
index 9c1c99ffee5277e76c9253107fa3ba7801107043..65572b5f040c71fc6127bfc846b4871dea9d90b4 100644 (file)
@@ -114,12 +114,12 @@ int(8)
 
 -- Iteration 3 --
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 
 -- Iteration 4 --
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 
 -- Iteration 5 --
@@ -127,12 +127,12 @@ bool(false)
 
 -- Iteration 6 --
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 
 -- Iteration 7 --
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 
 -- Iteration 8 --
@@ -199,4 +199,4 @@ int(8)
 
 Warning: mb_strpos() expects parameter 3 to be long, resource given in %s on line %d
 bool(false)
-Done
\ No newline at end of file
+Done
index cb7fe63dcb105addfbc5db03778595a0fd698a51..7a9604abeffd6950117380f74073c5c77adc5e49 100644 (file)
@@ -50,11 +50,11 @@ echo "Done";
 **-- Offset is: -10 --**
 -- ASCII String --
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 --Multibyte String --
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 
 **-- Offset is: 0 --**
@@ -78,40 +78,40 @@ int(20)
 **-- Offset is: 30 --**
 -- ASCII String --
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 --Multibyte String --
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 
 **-- Offset is: 40 --**
 -- ASCII String --
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 --Multibyte String --
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 
 **-- Offset is: 50 --**
 -- ASCII String --
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 --Multibyte String --
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 
 **-- Offset is: 60 --**
 -- ASCII String --
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
 --Multibyte String --
 
-Warning: mb_strpos(): Offset not contained in string. in %s on line %d
+Warning: mb_strpos(): Offset not contained in string in %s on line %d
 bool(false)
-Done
\ No newline at end of file
+Done
index 3f52f57fc87e03f56bfc5f8a04380cd5d689a7f1..eb23d801be9ba8a4f7de86643237d4aed30c8f22 100644 (file)
@@ -116,27 +116,27 @@ int(8)
 
 -- Iteration 3 --
 
-Notice: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
 -- Iteration 4 --
 
-Notice: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
 -- Iteration 5 --
 
-Notice: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
 -- Iteration 6 --
 
-Notice: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
 -- Iteration 7 --
 
-Notice: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
 -- Iteration 8 --
@@ -203,4 +203,4 @@ int(8)
 
 Warning: mb_strripos() expects parameter 3 to be long, resource given in %s on line %d
 bool(false)
-Done
\ No newline at end of file
+Done
index 28401c219fc8452505c3aa55e8a9f451d2d5e05c..8c40a6fa6788402134b1d796b256516296181209 100644 (file)
@@ -76,40 +76,40 @@ int(20)
 **-- Offset is: 30 --**
 -- ASCII String --
 
-Notice: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 --Multibyte String --
 
-Notice: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
 **-- Offset is: 40 --**
 -- ASCII String --
 
-Notice: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 --Multibyte String --
 
-Notice: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
 **-- Offset is: 50 --**
 -- ASCII String --
 
-Notice: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 --Multibyte String --
 
-Notice: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
 **-- Offset is: 60 --**
 -- ASCII String --
 
-Notice: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 --Multibyte String --
 
-Notice: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
-Done
\ No newline at end of file
+Done
index 83ba0992ad7b413f4f2cc2f565502a23ce925967..95840f9e734992dc04c1b248e0bb830be7b3c470 100644 (file)
@@ -97,12 +97,12 @@ int(8)
 
 -- Iteration 3 --
 
-Notice: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
 -- Iteration 4 --
 
-Notice: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
 -- Iteration 5 --
@@ -113,7 +113,7 @@ bool(false)
 
 -- Iteration 7 --
 
-Notice: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
 -- Iteration 8 --
@@ -150,4 +150,4 @@ int(8)
 
 -- Iteration 18 --
 int(8)
-Done
\ No newline at end of file
+Done
index 943114d512377bb12e91b229b9d63540714f0788..e4bba8f440ad78e086fe485ba49fc092c813326c 100644 (file)
@@ -53,10 +53,10 @@ bool(false)
 Warning: stripos(): Offset not contained in string in %s on line %d
 bool(false)
 
-Notice: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
-Notice: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 int(2)
 string(8) "abcdeabc"
index daa917e79fe22562618733cf541cdb0316bb15fb..524699ad52456c53c32893d263e0141c37387dad 100644 (file)
@@ -16,30 +16,30 @@ var_dump(strripos(1024, "te", -PHP_INT_MAX-1));
 echo "Done\n";
 ?>
 --EXPECTF--    
-Notice: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
-Notice: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
-Notice: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
-Notice: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
 Warning: strripos() expects parameter 1 to be string, array given in %s on line %d
 bool(false)
 
-Notice: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
-Notice: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
-Notice: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 
-Notice: strripos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 Done
index 617685325f1d49bede910447c8eeed4bc6971083..53c123a3fd1be0d9425249ac39ea35245ea93e1f 100644 (file)
@@ -92,7 +92,7 @@ int(6)
 int(6)
 -- Iteration 3 --
 
-Notice: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 -- Iteration 4 --
 int(6)
index 23c7aef145eb836da7180ba9982d5ed9badf9249..d958cdc485f890c5c9b026581c1e2e97f66e32cd 100644 (file)
@@ -94,23 +94,23 @@ bool(false)
 bool(false)
 -- Iteration 3 --
 
-Notice: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 -- Iteration 4 --
 
-Notice: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 -- Iteration 5 --
 
-Notice: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 -- Iteration 6 --
 
-Notice: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 -- Iteration 7 --
 
-Notice: strrpos(): Offset is greater than the length of haystack string in %s on line %d
+Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
 bool(false)
 -- Iteration 8 --
 bool(false)