]> granicus.if.org Git - php/commitdiff
It's a tradition return NULL on error of args parsing
authorXinchen Hui <laruence@gmail.com>
Mon, 24 Mar 2014 06:31:03 +0000 (14:31 +0800)
committerXinchen Hui <laruence@gmail.com>
Mon, 24 Mar 2014 06:31:03 +0000 (14:31 +0800)
37 files changed:
ext/mbstring/mbstring.c
ext/mbstring/tests/mb_internal_encoding_error1.phpt
ext/mbstring/tests/mb_internal_encoding_variation1.phpt
ext/mbstring/tests/mb_stripos.phpt
ext/mbstring/tests/mb_stripos_error1.phpt
ext/mbstring/tests/mb_stripos_variation1.phpt
ext/mbstring/tests/mb_stripos_variation2.phpt
ext/mbstring/tests/mb_stripos_variation3.phpt
ext/mbstring/tests/mb_stripos_variation4.phpt
ext/mbstring/tests/mb_stristr_error1.phpt
ext/mbstring/tests/mb_stristr_variation1.phpt
ext/mbstring/tests/mb_stristr_variation2.phpt
ext/mbstring/tests/mb_stristr_variation3.phpt
ext/mbstring/tests/mb_stristr_variation4.phpt
ext/mbstring/tests/mb_strlen_error1.phpt
ext/mbstring/tests/mb_strlen_variation1.phpt
ext/mbstring/tests/mb_strlen_variation2.phpt
ext/mbstring/tests/mb_strrchr_error1.phpt
ext/mbstring/tests/mb_strrchr_variation1.phpt
ext/mbstring/tests/mb_strrchr_variation2.phpt
ext/mbstring/tests/mb_strrchr_variation3.phpt
ext/mbstring/tests/mb_strrchr_variation4.phpt
ext/mbstring/tests/mb_strrichr_error1.phpt
ext/mbstring/tests/mb_strrichr_variation1.phpt
ext/mbstring/tests/mb_strrichr_variation2.phpt
ext/mbstring/tests/mb_strrichr_variation3.phpt
ext/mbstring/tests/mb_strrichr_variation4.phpt
ext/mbstring/tests/mb_strripos_error1.phpt
ext/mbstring/tests/mb_strripos_variation1.phpt
ext/mbstring/tests/mb_strripos_variation2.phpt
ext/mbstring/tests/mb_strripos_variation3_Bug45923.phpt
ext/mbstring/tests/mb_strripos_variation4.phpt
ext/mbstring/tests/mb_strstr_error1.phpt
ext/mbstring/tests/mb_strstr_variation1.phpt
ext/mbstring/tests/mb_strstr_variation2.phpt
ext/mbstring/tests/mb_strstr_variation3.phpt
ext/mbstring/tests/mb_strstr_variation4.phpt

index 9b182365cfdd1eeb8155d2fac47d3fc69ce81abe..f9d51e531e50f86340f89d33978426ed36573076 100644 (file)
@@ -1739,7 +1739,7 @@ PHP_FUNCTION(mb_internal_encoding)
        const mbfl_encoding *encoding;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &name, &name_len) == FAILURE) {
-               RETURN_FALSE;
+               return;
        }
        if (name == NULL) {
                name = MBSTRG(current_internal_encoding) ? MBSTRG(current_internal_encoding)->name: NULL;
@@ -1773,7 +1773,7 @@ PHP_FUNCTION(mb_http_input)
 
        retname = 1;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &typ, &typ_len) == FAILURE) {
-               RETURN_FALSE;
+               return;
        }
        if (typ == NULL) {
                result = MBSTRG(http_input_identify);
@@ -2196,7 +2196,7 @@ PHP_FUNCTION(mb_strlen)
        mbfl_string_init(&string);
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", (char **)&string.val, &string.len, &enc_name, &enc_name_len) == FAILURE) {
-               RETURN_FALSE;
+               return;
        }
 
        string.no_language = MBSTRG(language);
@@ -2394,7 +2394,7 @@ PHP_FUNCTION(mb_stripos)
        offset = 0;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|ls", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) {
-               RETURN_FALSE;
+               return;
        }
        if (needle.len == 0) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter");
@@ -2423,7 +2423,7 @@ PHP_FUNCTION(mb_strripos)
        offset = 0;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|ls", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) {
-               RETURN_FALSE;
+               return;
        }
 
        n = php_mb_stripos(1, (char *)haystack.val, haystack.len, (char *)needle.val, needle.len, offset, from_encoding TSRMLS_CC);
@@ -2454,7 +2454,7 @@ PHP_FUNCTION(mb_strstr)
        needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|bs", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &part, &enc_name, &enc_name_len) == FAILURE) {
-               RETURN_FALSE;
+               return;
        }
 
        if (enc_name != NULL) {
@@ -2516,7 +2516,7 @@ PHP_FUNCTION(mb_strrchr)
        needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|bs", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &enc_name, &enc_name_len) == FAILURE) {
-               RETURN_FALSE;
+               return;
        }
 
        if (enc_name != NULL) {
@@ -2580,7 +2580,7 @@ PHP_FUNCTION(mb_stristr)
 
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|bs", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &from_encoding, &from_encoding_len) == FAILURE) {
-               RETURN_FALSE;
+               return;
        }
 
        if (!needle.len) {
@@ -2642,7 +2642,7 @@ PHP_FUNCTION(mb_strrichr)
 
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|bs", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &part, &from_encoding, &from_encoding_len) == FAILURE) {
-               RETURN_FALSE;
+               return;
        }
 
        haystack.no_encoding = needle.no_encoding = mbfl_name2no_encoding(from_encoding);
@@ -3142,8 +3142,9 @@ PHP_FUNCTION(mb_convert_case)
 
        RETVAL_FALSE;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|s!", &str, &str_len,
-                               &case_mode, &from_encoding, &from_encoding_len) == FAILURE)
-               RETURN_FALSE;
+                               &case_mode, &from_encoding, &from_encoding_len) == FAILURE) {
+               return;
+       }
 
        newstr = php_unicode_convert_case(case_mode, str, (size_t) str_len, &ret_len, from_encoding TSRMLS_CC);
 
@@ -3312,7 +3313,7 @@ PHP_FUNCTION(mb_encoding_aliases)
        int name_len;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) {
-               RETURN_FALSE;
+               return;
        }
 
        encoding = mbfl_name2encoding(name);
@@ -4537,7 +4538,7 @@ PHP_FUNCTION(mb_check_encoding)
        long illegalchars = 0;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ss", &var, &var_len, &enc, &enc_len) == FAILURE) {
-               RETURN_FALSE;
+               return;
        }
 
        if (var == NULL) {
index 61f133a44af0cc379152e501d1297448cba2e4f8..ce824e6a2fd57ce204eccfff8732a7e247190dcd 100644 (file)
@@ -32,5 +32,5 @@ echo "Done";
 -- Testing mb_internal_encoding() function with more than expected no. of arguments --
 
 Warning: mb_internal_encoding() expects at most 1 parameter, 2 given in %s on line %d
-bool(false)
+NULL
 Done
index 94bb0cfd437f4478fbc4c17f531768dd297cf28a..581df0641484371cad5b2643e0f546ae0b7d4bd9 100644 (file)
@@ -213,5 +213,5 @@ bool(false)
 -- Iteration 24 --
 
 Warning: mb_internal_encoding() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
+NULL
 Done
index c21cdf3a593c024879706501634bb916e1153ce3..4ea8cfa6d6c00d18d2a3277bec3d24f274c90076 100644 (file)
@@ -106,13 +106,13 @@ $r = mb_stripos($euc_jp,b"\n");
 echo "== INVALID PARAMETER TEST ==\n";
 
 $r = mb_stripos($euc_jp,'','EUC-JP');
-($r === FALSE) ? print("OK_NULL\n") : print("NG_NULL\n");
+($r === NULL) ? print("OK_NULL\n") : print("NG_NULL\n");
 $r = mb_stripos($euc_jp, $t_ary, 'EUC-JP');
-($r === FALSE) ? print("OK_ARRAY\n") : print("NG_ARRAY\n");
+($r === NULL) ? print("OK_ARRAY\n") : print("NG_ARRAY\n");
 $r = mb_stripos($euc_jp, $t_obj, 'EUC-JP');
-($r === FALSE) ? print("OK_OBJECT\n") : print("NG_OBJECT\n");
+($r === NULL) ? print("OK_OBJECT\n") : print("NG_OBJECT\n");
 $r = mb_stripos($euc_jp, $t_obj, 'BAD_ENCODING');
-($r === FALSE) ? print("OK_BAD_ENCODING\n") : print("NG_BAD_ENCODING\n");
+($r === NULL) ? print("OK_BAD_ENCODING\n") : print("NG_BAD_ENCODING\n");
 
 
 ?>
index c4ea5d7714ef946fe64b1ae1a7f1e9a531d34c8d..832a8661bdc38f905e6d77b73ba285a3c2f76c01 100644 (file)
@@ -42,10 +42,10 @@ echo "Done";
 -- Testing mb_stripos() function with more than expected no. of arguments --
 
 Warning: mb_stripos() expects at most 4 parameters, 5 given in %s on line %d
-bool(false)
+NULL
 
 -- Testing mb_stripos() function with less than expected no. of arguments --
 
 Warning: mb_stripos() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
+NULL
 Done
index ab7f75ee5ab1277e0ac818f865c420c2151b3d22..2fe5c022f2d1bfc81a0b683c000f3164c9bc5e39 100644 (file)
@@ -179,5 +179,5 @@ bool(false)
 -- Iteration 24 --
 
 Warning: mb_stripos() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-Done
\ No newline at end of file
+NULL
+Done
index 1b5263aa8ad822a38b04706c1f9705993316adbb..95c2d0895797ce2c6f4290a627c0dacd06d18d23 100644 (file)
@@ -195,6 +195,6 @@ bool(false)
 -- Iteration 24 --
 
 Warning: mb_stripos() expects parameter 2 to be string, resource given in %s on line %d
-bool(false)
+NULL
 Done
 
index 41a365abfd7a415548e2de8faac9fc7ecc2fa686..decf02e8830943a578a6c79938f106d9e5a8b51b 100644 (file)
@@ -163,32 +163,32 @@ int(8)
 -- Iteration 16 --
 
 Warning: mb_stripos() expects parameter 3 to be long, string given in %s on line %d
-bool(false)
+NULL
 
 -- Iteration 17 --
 
 Warning: mb_stripos() expects parameter 3 to be long, string given in %s on line %d
-bool(false)
+NULL
 
 -- Iteration 18 --
 
 Warning: mb_stripos() expects parameter 3 to be long, string given in %s on line %d
-bool(false)
+NULL
 
 -- Iteration 19 --
 
 Warning: mb_stripos() expects parameter 3 to be long, string given in %s on line %d
-bool(false)
+NULL
 
 -- Iteration 20 --
 
 Warning: mb_stripos() expects parameter 3 to be long, string given in %s on line %d
-bool(false)
+NULL
 
 -- Iteration 21 --
 
 Warning: mb_stripos() expects parameter 3 to be long, object given in %s on line %d
-bool(false)
+NULL
 
 -- Iteration 22 --
 int(8)
@@ -199,5 +199,5 @@ int(8)
 -- Iteration 24 --
 
 Warning: mb_stripos() expects parameter 3 to be long, resource given in %s on line %d
-bool(false)
+NULL
 Done
index f330bbdae8dcd690c8946651dce09248d1741d66..a8d36f9e452f0079f3aa10f157c24052a0038c06 100644 (file)
@@ -219,5 +219,5 @@ bool(false)
 -- Iteration 24 --
 
 Warning: mb_stripos() expects parameter 4 to be string, resource given in %s on line %d
-bool(false)
-Done
\ No newline at end of file
+NULL
+Done
index 3c766c4fad4cdd1ed1ea9ec4fdd19d933c23672d..8c81b0766dbee006171efb4dc152750a68f5bdc2 100644 (file)
@@ -38,10 +38,10 @@ var_dump( mb_stristr($haystack) );
 -- Testing mb_stristr() function with more than expected no. of arguments --
 
 Warning: mb_stristr() expects at most 4 parameters, 5 given in %s on line %d
-bool(false)
+NULL
 
 -- Testing mb_stristr() function with less than expected no. of arguments --
 
 Warning: mb_stristr() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
+NULL
 ===DONE===
index fc69bd065e19d08442e1084a74e2684f8887a095..9483c379e006a4b54073624d4dcf8f0f238ae391 100644 (file)
@@ -150,19 +150,19 @@ bool(false)
 
 --empty array--
 Error: 2 - mb_stristr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_stristr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_stristr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_stristr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 bool(false)
@@ -193,7 +193,7 @@ bool(false)
 
 --instance of classWithoutToString--
 Error: 2 - mb_stristr() expects parameter 1 to be string, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 bool(false)
@@ -203,6 +203,6 @@ bool(false)
 
 --resource--
 Error: 2 - mb_stristr() expects parameter 1 to be string, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===
 
index bfa1835eedf86f73c33a82961775b93beed9052e..0aeea8e68cdadbdf97fdae960c72aebf95f3c506 100644 (file)
@@ -150,19 +150,19 @@ bool(false)
 
 --empty array--
 Error: 2 - mb_stristr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_stristr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_stristr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_stristr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 Error: 2 - mb_stristr(): Empty delimiter, %s(%d)
@@ -199,7 +199,7 @@ bool(false)
 
 --instance of classWithoutToString--
 Error: 2 - mb_stristr() expects parameter 2 to be string, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 Error: 2 - mb_stristr(): Empty delimiter, %s(%d)
@@ -211,6 +211,6 @@ bool(false)
 
 --resource--
 Error: 2 - mb_stristr() expects parameter 2 to be string, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===
 
index 30a7e4989ba5424f91bdb8d79eddf7c80fc61fd3..d06ad15070bb0f9ce996547a910724b46a47040c 100644 (file)
@@ -118,7 +118,7 @@ $inputs = array(
 foreach($inputs as $key =>$value) {
       echo "\n--$key--\n";
       $res = mb_stristr($haystack, $needle, $value, $encoding);
-      if ($res === false) {
+      if ($res === NULL) {
          var_dump($res);
       }
       else {
@@ -162,19 +162,19 @@ string(12) "737472696e67"
 
 --empty array--
 Error: 2 - mb_stristr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_stristr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_stristr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_stristr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 string(8) "5f76616c"
@@ -214,11 +214,11 @@ string(12) "737472696e67"
 
 --instance of classWithToString--
 Error: 2 - mb_stristr() expects parameter 3 to be boolean, object given, %s(%d)
-bool(false)
+NULL
 
 --instance of classWithoutToString--
 Error: 2 - mb_stristr() expects parameter 3 to be boolean, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 string(8) "5f76616c"
@@ -228,5 +228,5 @@ string(8) "5f76616c"
 
 --resource--
 Error: 2 - mb_stristr() expects parameter 3 to be boolean, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===
index d547543aedcb72f0dc377a09c7317be72c55d8a8..c735e0c7a7133f9370d71ce42b58e80378a9fffd 100644 (file)
@@ -159,19 +159,19 @@ bool(false)
 
 --empty array--
 Error: 2 - mb_stristr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_stristr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_stristr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_stristr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 Error: 2 - mb_stristr(): Unknown encoding "", %s(%d)
@@ -211,7 +211,7 @@ bool(false)
 
 --instance of classWithoutToString--
 Error: 2 - mb_stristr() expects parameter 4 to be string, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 Error: 2 - mb_stristr(): Unknown encoding "", %s(%d)
@@ -223,5 +223,5 @@ bool(false)
 
 --resource--
 Error: 2 - mb_stristr() expects parameter 4 to be string, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===
index 8fcd87ec3af7ee801f865f51598b770b65effe64..aff78d60f3e58cd41a1fb382acaa75a921ac7693 100644 (file)
@@ -37,10 +37,10 @@ echo "Done";
 -- Testing mb_strlen() function with Zero arguments --
 
 Warning: mb_strlen() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
+NULL
 
 -- Testing mb_strlen() function with more than expected no. of arguments --
 
 Warning: mb_strlen() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
+NULL
 Done
index 3c9cfe3c8426792bbb8c28acb433f4843646f37f..9388c0547d40943b3c4f0e5e37a12e817ebf7403 100644 (file)
@@ -176,5 +176,5 @@ int(0)
 -- Iteration 24 --
 
 Warning: mb_strlen() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-Done
\ No newline at end of file
+NULL
+Done
index 8504bbc5a04fd754ed3d3800b9ddfcb395e14697..276731ce9294e0242d384345ac908b3d91a82909 100644 (file)
@@ -216,5 +216,5 @@ bool(false)
 -- Iteration 24 --
 
 Warning: mb_strlen() expects parameter 2 to be string, resource given in %s on line %d
-bool(false)
+NULL
 Done
index 5ebb3d06f668fb2b1b112e5ff7e0eed72da09965..bb6ff0fab058fbece150ce27c01c2bdd7572a321 100644 (file)
@@ -38,10 +38,10 @@ var_dump( mb_strrchr($haystack) );
 -- Testing mb_strrchr() function with more than expected no. of arguments --
 
 Warning: mb_strrchr() expects at most 4 parameters, 5 given in %s on line %d
-bool(false)
+NULL
 
 -- Testing mb_strrchr() function with less than expected no. of arguments --
 
 Warning: mb_strrchr() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
+NULL
 ===DONE===
index 18eb52ea287fc2ced2b92aee852a848e3e3e454c..a0952a87ea3ad27bdc5571f7cb2c6e3e071f6f99 100644 (file)
@@ -150,19 +150,19 @@ bool(false)
 
 --empty array--
 Error: 2 - mb_strrchr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_strrchr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_strrchr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_strrchr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 bool(false)
@@ -193,7 +193,7 @@ bool(false)
 
 --instance of classWithoutToString--
 Error: 2 - mb_strrchr() expects parameter 1 to be string, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 bool(false)
@@ -203,5 +203,5 @@ bool(false)
 
 --resource--
 Error: 2 - mb_strrchr() expects parameter 1 to be string, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===
index f9b710783063c9a8557cfe4ef904de48273afb5f..c368bd8c9d032d6b3d583b49ba670e4d6db95eac 100644 (file)
@@ -150,19 +150,19 @@ bool(false)
 
 --empty array--
 Error: 2 - mb_strrchr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_strrchr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_strrchr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_strrchr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 bool(false)
@@ -193,7 +193,7 @@ bool(false)
 
 --instance of classWithoutToString--
 Error: 2 - mb_strrchr() expects parameter 2 to be string, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 bool(false)
@@ -203,5 +203,5 @@ bool(false)
 
 --resource--
 Error: 2 - mb_strrchr() expects parameter 2 to be string, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===
index 4a16f55b48d4158aa7dd8dff0dd99194f35cbbdd..ad9c4e356de499440120989d3aecce5f5c1dcf8f 100644 (file)
@@ -118,7 +118,7 @@ $inputs = array(
 foreach($inputs as $key =>$value) {
       echo "\n--$key--\n";
       $res = mb_strrchr($haystack, $needle, $value, $encoding);
-      if ($res === false) {
+      if ($res === NULL) {
          var_dump($res);
       }
       else {
@@ -162,19 +162,19 @@ string(12) "737472696e67"
 
 --empty array--
 Error: 2 - mb_strrchr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_strrchr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_strrchr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_strrchr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 string(8) "5f76616c"
@@ -214,11 +214,11 @@ string(12) "737472696e67"
 
 --instance of classWithToString--
 Error: 2 - mb_strrchr() expects parameter 3 to be boolean, object given, %s(%d)
-bool(false)
+NULL
 
 --instance of classWithoutToString--
 Error: 2 - mb_strrchr() expects parameter 3 to be boolean, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 string(8) "5f76616c"
@@ -228,5 +228,5 @@ string(8) "5f76616c"
 
 --resource--
 Error: 2 - mb_strrchr() expects parameter 3 to be boolean, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===
index b9e014706c3db2b13f0ce862a13ebf8bf8cb3599..f9dadab5f020e3aa162c40298b403008870dabef 100644 (file)
@@ -159,19 +159,19 @@ bool(false)
 
 --empty array--
 Error: 2 - mb_strrchr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_strrchr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_strrchr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_strrchr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d)
@@ -211,7 +211,7 @@ bool(false)
 
 --instance of classWithoutToString--
 Error: 2 - mb_strrchr() expects parameter 4 to be string, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 Error: 2 - mb_strrchr(): Unknown encoding "", %s(%d)
@@ -223,5 +223,5 @@ bool(false)
 
 --resource--
 Error: 2 - mb_strrchr() expects parameter 4 to be string, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===
index 2c2ed611492e138f5d386a66e2cf93299d990cd6..01d33f342f7e962d45547b0f065aa9c72ce36a33 100644 (file)
@@ -38,10 +38,10 @@ var_dump( mb_strrichr($haystack) );
 -- Testing mb_strrichr() function with more than expected no. of arguments --
 
 Warning: mb_strrichr() expects at most 4 parameters, 5 given in %s on line %d
-bool(false)
+NULL
 
 -- Testing mb_strrichr() function with less than expected no. of arguments --
 
 Warning: mb_strrichr() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
+NULL
 ===DONE===
index d826ccf40760201a4fd86e7c86269cb89eae2dd6..e350718e77ce832cbc99c49e714a6ecc900473f3 100644 (file)
@@ -150,19 +150,19 @@ bool(false)
 
 --empty array--
 Error: 2 - mb_strrichr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_strrichr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_strrichr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_strrichr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 bool(false)
@@ -193,7 +193,7 @@ bool(false)
 
 --instance of classWithoutToString--
 Error: 2 - mb_strrichr() expects parameter 1 to be string, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 bool(false)
@@ -203,5 +203,5 @@ bool(false)
 
 --resource--
 Error: 2 - mb_strrichr() expects parameter 1 to be string, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===
index 1a4a73fe449c1b6274a0e9a94981b2557b6b6950..3300ea5a61149e084fe41074ea19031b061c62b8 100644 (file)
@@ -150,19 +150,19 @@ bool(false)
 
 --empty array--
 Error: 2 - mb_strrichr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_strrichr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_strrichr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_strrichr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 bool(false)
@@ -193,7 +193,7 @@ bool(false)
 
 --instance of classWithoutToString--
 Error: 2 - mb_strrichr() expects parameter 2 to be string, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 bool(false)
@@ -203,5 +203,5 @@ bool(false)
 
 --resource--
 Error: 2 - mb_strrichr() expects parameter 2 to be string, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===
index 68e8083bdcb6c0e8f4451b7b1bf7f452acbaf8a9..b57f309022584a201cb1c73d251cce8b9258baef 100644 (file)
@@ -118,7 +118,7 @@ $inputs = array(
 foreach($inputs as $key =>$value) {
       echo "\n--$key--\n";
       $res = mb_strrichr($haystack, $needle, $value, $encoding);
-      if ($res === false) {
+      if ($res === NULL) {
          var_dump($res);
       }
       else {
@@ -162,19 +162,19 @@ string(12) "737472696e67"
 
 --empty array--
 Error: 2 - mb_strrichr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_strrichr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_strrichr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_strrichr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 string(8) "5f76616c"
@@ -214,11 +214,11 @@ string(12) "737472696e67"
 
 --instance of classWithToString--
 Error: 2 - mb_strrichr() expects parameter 3 to be boolean, object given, %s(%d)
-bool(false)
+NULL
 
 --instance of classWithoutToString--
 Error: 2 - mb_strrichr() expects parameter 3 to be boolean, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 string(8) "5f76616c"
@@ -228,5 +228,5 @@ string(8) "5f76616c"
 
 --resource--
 Error: 2 - mb_strrichr() expects parameter 3 to be boolean, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===
index d2e5754c1d70b6977a94938f43cc01d6b9c4f7b2..2d0466588405e9e7ec8b5e83350d36d36411c928 100644 (file)
@@ -159,19 +159,19 @@ bool(false)
 
 --empty array--
 Error: 2 - mb_strrichr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_strrichr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_strrichr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_strrichr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d)
@@ -211,7 +211,7 @@ bool(false)
 
 --instance of classWithoutToString--
 Error: 2 - mb_strrichr() expects parameter 4 to be string, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 Error: 2 - mb_strrichr(): Unknown encoding "", %s(%d)
@@ -223,5 +223,5 @@ bool(false)
 
 --resource--
 Error: 2 - mb_strrichr() expects parameter 4 to be string, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===
index 9d114d55a4efca4ab9c6a412fabf9720f7a80084..955482b66faea78eb3f4881c053cd74c05c48f6a 100644 (file)
@@ -42,10 +42,10 @@ echo "Done";
 -- Testing mb_strripos() function with more than expected no. of arguments --
 
 Warning: mb_strripos() expects at most 4 parameters, 5 given in %s on line %d
-bool(false)
+NULL
 
 -- Testing mb_strripos() function with less than expected no. of arguments --
 
 Warning: mb_strripos() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
+NULL
 Done
index 704b50177841541d08e317f6dbb997dab744db4f..858705afc2e2dddba65ea3ea30f6e9061e8ec0db 100644 (file)
@@ -179,5 +179,5 @@ bool(false)
 -- Iteration 24 --
 
 Warning: mb_strripos() expects parameter 1 to be string, resource given in %s on line %d
-bool(false)
-Done
\ No newline at end of file
+NULL
+Done
index 61196f007ed0c3e6759b625fbe70fb5aa489c4a4..d16c2500780d32994603e9eedf98a545681312e8 100644 (file)
@@ -179,5 +179,5 @@ bool(false)
 -- Iteration 24 --
 
 Warning: mb_strripos() expects parameter 2 to be string, resource given in %s on line %d
-bool(false)
-Done
\ No newline at end of file
+NULL
+Done
index c8fb9333630429c8aac3235b01239da86651173f..8f4370f4b8480ec02ace67541e89f3c525755ba5 100644 (file)
@@ -165,32 +165,32 @@ int(8)
 -- Iteration 16 --
 
 Warning: mb_strripos() expects parameter 3 to be long, string given in %s on line %d
-bool(false)
+NULL
 
 -- Iteration 17 --
 
 Warning: mb_strripos() expects parameter 3 to be long, string given in %s on line %d
-bool(false)
+NULL
 
 -- Iteration 18 --
 
 Warning: mb_strripos() expects parameter 3 to be long, string given in %s on line %d
-bool(false)
+NULL
 
 -- Iteration 19 --
 
 Warning: mb_strripos() expects parameter 3 to be long, string given in %s on line %d
-bool(false)
+NULL
 
 -- Iteration 20 --
 
 Warning: mb_strripos() expects parameter 3 to be long, string given in %s on line %d
-bool(false)
+NULL
 
 -- Iteration 21 --
 
 Warning: mb_strripos() expects parameter 3 to be long, object given in %s on line %d
-bool(false)
+NULL
 
 -- Iteration 22 --
 int(8)
@@ -201,6 +201,6 @@ int(8)
 -- Iteration 24 --
 
 Warning: mb_strripos() expects parameter 3 to be long, resource given in %s on line %d
-bool(false)
+NULL
 Done
 
index d617872efbf0da9bd5b75da550986cd2e6bdb87c..c58568b69783ce3491c66ccfc45dae804ddb973c 100644 (file)
@@ -219,5 +219,5 @@ bool(false)
 -- Iteration 24 --
 
 Warning: mb_strripos() expects parameter 4 to be string, resource given in %s on line %d
-bool(false)
-Done
\ No newline at end of file
+NULL
+Done
index f38d5c9ccd1db0b8c2c4669e9db6cce81192b5bc..ffbb636160ac8547f6c10b0c7b0fb4501a1eb5ad 100644 (file)
@@ -38,10 +38,10 @@ var_dump( mb_strstr($haystack) );
 -- Testing mb_strstr() function with more than expected no. of arguments --
 
 Warning: mb_strstr() expects at most 4 parameters, 5 given in %s on line %d
-bool(false)
+NULL
 
 -- Testing mb_strstr() function with less than expected no. of arguments --
 
 Warning: mb_strstr() expects at least 2 parameters, 1 given in %s on line %d
-bool(false)
+NULL
 ===DONE===
index 48e7c537eed72a85ead7dea78dde9a4af9084b5b..826014feae005f111d749afae136ad69014ef504 100644 (file)
@@ -150,19 +150,19 @@ bool(false)
 
 --empty array--
 Error: 2 - mb_strstr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_strstr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_strstr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_strstr() expects parameter 1 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 bool(false)
@@ -193,7 +193,7 @@ bool(false)
 
 --instance of classWithoutToString--
 Error: 2 - mb_strstr() expects parameter 1 to be string, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 bool(false)
@@ -203,5 +203,5 @@ bool(false)
 
 --resource--
 Error: 2 - mb_strstr() expects parameter 1 to be string, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===
index f70bb67ada7c7c7eec6063ff5a32226920ba0679..18820bab0f49e28fb3026cf5abef3558dc36abd1 100644 (file)
@@ -150,19 +150,19 @@ bool(false)
 
 --empty array--
 Error: 2 - mb_strstr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_strstr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_strstr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_strstr() expects parameter 2 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 Error: 2 - mb_strstr(): Empty delimiter, %s(%d)
@@ -199,7 +199,7 @@ bool(false)
 
 --instance of classWithoutToString--
 Error: 2 - mb_strstr() expects parameter 2 to be string, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 Error: 2 - mb_strstr(): Empty delimiter, %s(%d)
@@ -211,5 +211,5 @@ bool(false)
 
 --resource--
 Error: 2 - mb_strstr() expects parameter 2 to be string, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===
index 55c8f31d9683a4cbbdc00923b8f9650fa5467bfa..7a8b7c6757b6013163e9fcca056b492b424210e6 100644 (file)
@@ -118,7 +118,7 @@ $inputs = array(
 foreach($inputs as $key =>$value) {
       echo "\n--$key--\n";
       $res = mb_strstr($haystack, $needle, $value, $encoding);
-      if ($res === false) {
+      if ($res === NULL) {
          var_dump($res);
       }
       else {
@@ -162,19 +162,19 @@ string(12) "737472696e67"
 
 --empty array--
 Error: 2 - mb_strstr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_strstr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_strstr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_strstr() expects parameter 3 to be boolean, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 string(8) "5f76616c"
@@ -214,11 +214,11 @@ string(12) "737472696e67"
 
 --instance of classWithToString--
 Error: 2 - mb_strstr() expects parameter 3 to be boolean, object given, %s(%d)
-bool(false)
+NULL
 
 --instance of classWithoutToString--
 Error: 2 - mb_strstr() expects parameter 3 to be boolean, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 string(8) "5f76616c"
@@ -228,5 +228,5 @@ string(8) "5f76616c"
 
 --resource--
 Error: 2 - mb_strstr() expects parameter 3 to be boolean, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===
index 3a208d31222b48c2b390738a2d76048cd9450047..e13428f633f0d21b46e2e47492353c45c440a06b 100644 (file)
@@ -159,19 +159,19 @@ bool(false)
 
 --empty array--
 Error: 2 - mb_strstr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --int indexed array--
 Error: 2 - mb_strstr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --associative array--
 Error: 2 - mb_strstr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --nested arrays--
 Error: 2 - mb_strstr() expects parameter 4 to be string, array given, %s(%d)
-bool(false)
+NULL
 
 --uppercase NULL--
 Error: 2 - mb_strstr(): Unknown encoding "", %s(%d)
@@ -211,7 +211,7 @@ bool(false)
 
 --instance of classWithoutToString--
 Error: 2 - mb_strstr() expects parameter 4 to be string, object given, %s(%d)
-bool(false)
+NULL
 
 --undefined var--
 Error: 2 - mb_strstr(): Unknown encoding "", %s(%d)
@@ -223,5 +223,5 @@ bool(false)
 
 --resource--
 Error: 2 - mb_strstr() expects parameter 4 to be string, resource given, %s(%d)
-bool(false)
+NULL
 ===DONE===