]> granicus.if.org Git - php/commitdiff
fix tests: better float values
authorRaghubansh Kumar <kraghuba@php.net>
Fri, 9 Nov 2007 07:29:18 +0000 (07:29 +0000)
committerRaghubansh Kumar <kraghuba@php.net>
Fri, 9 Nov 2007 07:29:18 +0000 (07:29 +0000)
14 files changed:
ext/standard/tests/strings/chunk_split_variation1.phpt
ext/standard/tests/strings/chunk_split_variation2.phpt
ext/standard/tests/strings/chunk_split_variation3.phpt
ext/standard/tests/strings/crc32_variation1.phpt
ext/standard/tests/strings/strcspn_variation1.phpt
ext/standard/tests/strings/strcspn_variation2.phpt
ext/standard/tests/strings/strcspn_variation3.phpt
ext/standard/tests/strings/strcspn_variation4.phpt
ext/standard/tests/strings/strspn_variation1.phpt
ext/standard/tests/strings/strspn_variation2.phpt
ext/standard/tests/strings/strspn_variation3.phpt
ext/standard/tests/strings/strspn_variation4.phpt
ext/standard/tests/strings/strtok_variation1.phpt
ext/standard/tests/strings/ucwords_variation1.phpt

index 95d3720a78ad880f40fa71494f44a8e016035513..80d25dfff7b0cc52350b1b599322d0666c41ba89 100644 (file)
@@ -3,7 +3,7 @@ Test chunk_split() function : usage variations - with unexpected values for 'str
 --FILE--
 <?php
 /* Prototype  : string chunk_split(string $str [, int $chunklen [, string $ending]])
- * Description: Returns split line %d%d%d%d
+ * Description: Returns split line 
  * Source code: ext/standard/string.c
  * Alias to functions: none
 */
@@ -33,58 +33,58 @@ $fp = fopen(__FILE__, 'r');
 //different values for 'str'
 $values = array(
 
-      // int data
-      0,
-      1,
-      12345,
-      -2345,
-
-      // float data
-      10.5,
-      -10.5,
-      10.5e10,
-      10.6E-10,
-      .5,
-
-      // array data
-      array(),
-      array(0),
-      array(1),
-      array(1, 2),
-      array('color' => 'red', 'item' => 'pen'),
-
-      // null data
-      NULL,
-      null,
-
-      // boolean data
-      true,
-      false,
-      TRUE,
-      FALSE,
-
-      // empty data
-      "",
-      '',
-
-      // string data
-      "string",
-      'string',
-
-      // object data
-      new MyClass(),
-
-      // undefined data
-      @$undefined_var,
-
-      // unset data
-      @$unset_var,
-
-      // resource data
-      $fp      
+  // int data
+  0,
+  1,
+  12345,
+  -2345,
+
+  // float data
+  10.5,
+  -10.5,
+  10.1234567e10,
+  10.7654321E-10,
+  .5,
+
+  // array data
+  array(),
+  array(0),
+  array(1),
+  array(1, 2),
+  array('color' => 'red', 'item' => 'pen'),
+
+  // null data
+  NULL,
+  null,
+
+  // boolean data
+  true,
+  false,
+  TRUE,
+  FALSE,
+
+  // empty data
+  "",
+  '',
+
+  // string data
+  "string",
+  'string',
+
+  // object data
+  new MyClass(),
+
+  // undefined data
+  @$undefined_var,
+
+  // unset data
+  @$unset_var,
+
+  // resource data
+  $fp  
 );
 
-// loop through each element of the array for str
+// loop through each element of the array for 'str'
 for($count = 0; $count < count($values); $count++) {
   echo "-- Iteration ".($count+1)." --\n";
   var_dump( chunk_split($values[$count], $chunklen, $ending) );
@@ -111,30 +111,30 @@ string(6) "10 .5 "
 -- Iteration 6 --
 string(8) "-1 0. 5 "
 -- Iteration 7 --
-string(18) "10 50 00 00 00 00 "
+string(18) "10 12 34 56 70 00 "
 -- Iteration 8 --
-string(11) "1. 06 E- 9 "
+string(20) "1. 07 65 43 21 E- 9 "
 -- Iteration 9 --
 string(5) "0. 5 "
 -- Iteration 10 --
 
-Warning: chunk_split() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d%d
+Warning: chunk_split() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 -- Iteration 11 --
 
-Warning: chunk_split() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d%d
+Warning: chunk_split() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 -- Iteration 12 --
 
-Warning: chunk_split() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d%d
+Warning: chunk_split() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 -- Iteration 13 --
 
-Warning: chunk_split() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d%d
+Warning: chunk_split() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 -- Iteration 14 --
 
-Warning: chunk_split() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d%d
+Warning: chunk_split() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 -- Iteration 15 --
 string(1) " "
@@ -164,10 +164,9 @@ string(1) " "
 string(1) " "
 -- Iteration 28 --
 
-Warning: chunk_split() expects parameter 1 to be string (Unicode or binary), resource given in %s on line %d%d
+Warning: chunk_split() expects parameter 1 to be string (Unicode or binary), resource given in %s on line %d
 NULL
 Done
-
 --UEXPECTF--
 *** Testing chunk_split() : with unexpected values for 'str' argument ***
 -- Iteration 1 --
@@ -183,9 +182,9 @@ unicode(6) "10 .5 "
 -- Iteration 6 --
 unicode(8) "-1 0. 5 "
 -- Iteration 7 --
-unicode(18) "10 50 00 00 00 00 "
+unicode(18) "10 12 34 56 70 00 "
 -- Iteration 8 --
-unicode(11) "1. 06 E- 9 "
+unicode(20) "1. 07 65 43 21 E- 9 "
 -- Iteration 9 --
 unicode(5) "0. 5 "
 -- Iteration 10 --
index 5f1cb076fd66afd9252d23bcb8f86f1efbb5c7de..6da128dba6cae90cca0c844d59199c2b6bf2a3a8 100644 (file)
@@ -1,11 +1,11 @@
 --TEST--
-Test chunk_split() function : usage variations - unexpected values for 'chunklen' argument
+Test chunk_split() function : usage variations - unexpected values for 'chunklen' argument(Bug#42796)
 --FILE--
 <?php
 /* Prototype  : string chunk_split(string $str [, int $chunklen [, string $ending]])
  * Description: Returns split line
  * Source code: ext/standard/string.c
- * Alias to functions: 
+ * Alias to functions: none
 */
 
 echo "*** Testing chunk_split() : with unexpected values for 'chunklen' argument ***\n";
@@ -24,7 +24,7 @@ $fp = fopen(__FILE__, 'r');
 //Class to get object variable
 class MyClass
 {
-   public function __tostring() {
+   public function __toString() {
      return "object";
    }
 }
@@ -35,8 +35,8 @@ $values = array(
   // float data
   10.5,
   -10.5,
-  10.5e10,
-  10.6E-10,
+  10.1234567e10,
+  10.7654321E-10,
   .5,
 
   // array data
@@ -95,92 +95,93 @@ fclose($fp);
 string(28) "This is ch*uklen vari*ation*"
 -- Iteration 2 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d%d
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
 bool(false)
 -- Iteration 3 --
-string(26) "This is chuklen variation*"
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
 -- Iteration 4 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d%d
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
 bool(false)
 -- Iteration 5 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d%d
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
 bool(false)
 -- Iteration 6 --
 
-Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d%d
+Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d
 NULL
 -- Iteration 7 --
 
-Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d%d
+Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d
 NULL
 -- Iteration 8 --
 
-Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d%d
+Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d
 NULL
 -- Iteration 9 --
 
-Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d%d
+Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d
 NULL
 -- Iteration 10 --
 
-Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d%d
+Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d
 NULL
 -- Iteration 11 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d%d
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
 bool(false)
 -- Iteration 12 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d%d
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
 bool(false)
 -- Iteration 13 --
 string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
 -- Iteration 14 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d%d
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
 bool(false)
 -- Iteration 15 --
 string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
 -- Iteration 16 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d%d
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
 bool(false)
 -- Iteration 17 --
 
-Warning: chunk_split() expects parameter 2 to be long, string given in %s on line %d%d
+Warning: chunk_split() expects parameter 2 to be long, string given in %s on line %d
 NULL
 -- Iteration 18 --
 
-Warning: chunk_split() expects parameter 2 to be long, string given in %s on line %d%d
+Warning: chunk_split() expects parameter 2 to be long, string given in %s on line %d
 NULL
 -- Iteration 19 --
 
-Warning: chunk_split() expects parameter 2 to be long, string given in %s on line %d%d
+Warning: chunk_split() expects parameter 2 to be long, string given in %s on line %d
 NULL
 -- Iteration 20 --
 
-Warning: chunk_split() expects parameter 2 to be long, string given in %s on line %d%d
+Warning: chunk_split() expects parameter 2 to be long, string given in %s on line %d
 NULL
 -- Iteration 21 --
 
-Warning: chunk_split() expects parameter 2 to be long, object given in %s on line %d%d
+Warning: chunk_split() expects parameter 2 to be long, object given in %s on line %d
 NULL
 -- Iteration 22 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d%d
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
 bool(false)
 -- Iteration 23 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d%d
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
 bool(false)
 -- Iteration 24 --
 
-Warning: chunk_split() expects parameter 2 to be long, resource given in %s on line %d%d
+Warning: chunk_split() expects parameter 2 to be long, resource given in %s on line %d
 NULL
 Done
-
 --UEXPECTF--
 *** Testing chunk_split() : with unexpected values for 'chunklen' argument ***
 -- Iteration 1 --
@@ -190,7 +191,9 @@ unicode(28) "This is ch*uklen vari*ation*"
 Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
 bool(false)
 -- Iteration 3 --
-unicode(26) "This is chuklen variation*"
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
 -- Iteration 4 --
 
 Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
index cfd1a1e3a6e14687d863f701a7fdb16bc53e7aea..34ec2597644ea98e99875a9efabfdb9b2ae96e3a 100644 (file)
@@ -24,7 +24,7 @@ $fp = fopen(__FILE__,'r');
 //Class to get object variable
 class MyClass
 {
-  public function __tostring()
+  public function __toString()
   {
     return "object";
   }
@@ -42,8 +42,8 @@ $values = array(
   // float data
   10.5,
   -10.5,
-  10.5e10,
-  10.6E-10,
+  10.123456e10,
+  10.7654321E-10,
   .5,
 
   // array data
@@ -106,30 +106,30 @@ string(46) "This10.5 is 10.5simp10.5le s10.5trin10.5g.10.5"
 -- Iteration 6 --
 string(52) "This-10.5 is -10.5simp-10.5le s-10.5trin-10.5g.-10.5"
 -- Iteration 7 --
-string(94) "This105000000000 is 105000000000simp105000000000le s105000000000trin105000000000g.105000000000"
+string(94) "This101234560000 is 101234560000simp101234560000le s101234560000trin101234560000g.101234560000"
 -- Iteration 8 --
-string(64) "This1.06E-9 is 1.06E-9simp1.06E-9le s1.06E-9trin1.06E-9g.1.06E-9"
+string(100) "This1.07654321E-9 is 1.07654321E-9simp1.07654321E-9le s1.07654321E-9trin1.07654321E-9g.1.07654321E-9"
 -- Iteration 9 --
 string(40) "This0.5 is 0.5simp0.5le s0.5trin0.5g.0.5"
 -- Iteration 10 --
 
-Warning: chunk_split() expects parameter 3 to be string (Unicode or binary), array given in %s on line %d%d
+Warning: chunk_split() expects parameter 3 to be string (Unicode or binary), array given in %s on line %d
 NULL
 -- Iteration 11 --
 
-Warning: chunk_split() expects parameter 3 to be string (Unicode or binary), array given in %s on line %d%d
+Warning: chunk_split() expects parameter 3 to be string (Unicode or binary), array given in %s on line %d
 NULL
 -- Iteration 12 --
 
-Warning: chunk_split() expects parameter 3 to be string (Unicode or binary), array given in %s on line %d%d
+Warning: chunk_split() expects parameter 3 to be string (Unicode or binary), array given in %s on line %d
 NULL
 -- Iteration 13 --
 
-Warning: chunk_split() expects parameter 3 to be string (Unicode or binary), array given in %s on line %d%d
+Warning: chunk_split() expects parameter 3 to be string (Unicode or binary), array given in %s on line %d
 NULL
 -- Iteration 14 --
 
-Warning: chunk_split() expects parameter 3 to be string (Unicode or binary), array given in %s on line %d%d
+Warning: chunk_split() expects parameter 3 to be string (Unicode or binary), array given in %s on line %d
 NULL
 -- Iteration 15 --
 string(22) "This is simple string."
@@ -155,10 +155,9 @@ string(22) "This is simple string."
 string(22) "This is simple string."
 -- Iteration 26 --
 
-Warning: chunk_split() expects parameter 3 to be string (Unicode or binary), resource given in %s on line %d%d
+Warning: chunk_split() expects parameter 3 to be string (Unicode or binary), resource given in %s on line %d
 NULL
 Done
-
 --UEXPECTF--
 *** Testing chunk_split() : unexpected values for 'ending' ***
 -- Iteration 1 --
@@ -174,9 +173,9 @@ unicode(46) "This10.5 is 10.5simp10.5le s10.5trin10.5g.10.5"
 -- Iteration 6 --
 unicode(52) "This-10.5 is -10.5simp-10.5le s-10.5trin-10.5g.-10.5"
 -- Iteration 7 --
-unicode(94) "This105000000000 is 105000000000simp105000000000le s105000000000trin105000000000g.105000000000"
+unicode(94) "This101234560000 is 101234560000simp101234560000le s101234560000trin101234560000g.101234560000"
 -- Iteration 8 --
-unicode(64) "This1.06E-9 is 1.06E-9simp1.06E-9le s1.06E-9trin1.06E-9g.1.06E-9"
+unicode(100) "This1.07654321E-9 is 1.07654321E-9simp1.07654321E-9le s1.07654321E-9trin1.07654321E-9g.1.07654321E-9"
 -- Iteration 9 --
 unicode(40) "This0.5 is 0.5simp0.5le s0.5trin0.5g.0.5"
 -- Iteration 10 --
index 67884d89630426ad5ec2398e6554de4ff8e4be53..d2f8e5b41faf5887499be560945fa56f0b326186 100644 (file)
@@ -46,8 +46,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -89,7 +89,8 @@ $values = array(
 $count = 1;
 foreach($values as $value) {
       echo "\n-- Iteration $count --\n";
-      var_dump( crc32((binary)$value) );
+      var_dump( crc32($value) );
+      $count++;
 };
 
 // closing the resource
@@ -107,92 +108,101 @@ Notice: Undefined variable: unset_var in %s on line %d
 -- Iteration 1 --
 int(-186917087)
 
--- Iteration 1 --
+-- Iteration 2 --
 int(-2082672713)
 
--- Iteration 1 --
+-- Iteration 3 --
 int(-873121252)
 
--- Iteration 1 --
+-- Iteration 4 --
 int(1860518047)
 
--- Iteration 1 --
+-- Iteration 5 --
 int(269248583)
 
--- Iteration 1 --
+-- Iteration 6 --
 int(-834950157)
 
--- Iteration 1 --
-int(-638440228)
+-- Iteration 7 --
+int(-965354630)
 
--- Iteration 1 --
-int(-742287383)
+-- Iteration 8 --
+int(1376932222)
 
--- Iteration 1 --
+-- Iteration 9 --
 int(-2036403827)
 
--- Iteration 1 --
+-- Iteration 10 --
 
-Notice: Array to string conversion in %s on line %d
-int(1624097203)
+Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
+NULL
 
--- Iteration 1 --
+-- Iteration 11 --
 
-Notice: Array to string conversion in %s on line %d
-int(1624097203)
+Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
+NULL
 
--- Iteration 1 --
+-- Iteration 12 --
 
-Notice: Array to string conversion in %s on line %d
-int(1624097203)
+Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
+NULL
 
--- Iteration 1 --
+-- Iteration 13 --
 
-Notice: Array to string conversion in %s on line %d
-int(1624097203)
+Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
+NULL
 
--- Iteration 1 --
+-- Iteration 14 --
 
-Notice: Array to string conversion in %s on line %d
-int(1624097203)
+Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
+NULL
 
--- Iteration 1 --
-int(0)
+-- Iteration 15 --
 
--- Iteration 1 --
-int(0)
+Warning: crc32() expects parameter 1 to be strictly a binary string, null given in %s on line %d
+NULL
 
--- Iteration 1 --
+-- Iteration 16 --
+
+Warning: crc32() expects parameter 1 to be strictly a binary string, null given in %s on line %d
+NULL
+
+-- Iteration 17 --
 int(-2082672713)
 
--- Iteration 1 --
+-- Iteration 18 --
 int(0)
 
--- Iteration 1 --
+-- Iteration 19 --
 int(-2082672713)
 
--- Iteration 1 --
+-- Iteration 20 --
 int(0)
 
--- Iteration 1 --
+-- Iteration 21 --
 int(0)
 
--- Iteration 1 --
+-- Iteration 22 --
 int(0)
 
--- Iteration 1 --
+-- Iteration 23 --
 int(-1465013268)
 
--- Iteration 1 --
-int(0)
+-- Iteration 24 --
 
--- Iteration 1 --
-int(0)
+Warning: crc32() expects parameter 1 to be strictly a binary string, null given in %s on line %d
+NULL
 
--- Iteration 1 --
-int(716753449)
-Done
+-- Iteration 25 --
+
+Warning: crc32() expects parameter 1 to be strictly a binary string, null given in %s on line %d
+NULL
 
+-- Iteration 26 --
+
+Warning: crc32() expects parameter 1 to be string, resource given in %s on line %d
+NULL
+Done
 --UEXPECTF--
 *** Testing crc32() : with unexpected values for str argument ***
 
@@ -203,88 +213,102 @@ Notice: Undefined variable: unset_var in %s on line %d
 -- Iteration 1 --
 int(-186917087)
 
--- Iteration 1 --
+-- Iteration 2 --
 int(-2082672713)
 
--- Iteration 1 --
+-- Iteration 3 --
 int(-873121252)
 
--- Iteration 1 --
+-- Iteration 4 --
 int(1860518047)
 
--- Iteration 1 --
+-- Iteration 5 --
 int(269248583)
 
--- Iteration 1 --
+-- Iteration 6 --
 int(-834950157)
 
--- Iteration 1 --
-int(-638440228)
+-- Iteration 7 --
+int(-965354630)
 
--- Iteration 1 --
-int(-742287383)
+-- Iteration 8 --
+int(1376932222)
 
--- Iteration 1 --
+-- Iteration 9 --
 int(-2036403827)
 
--- Iteration 1 --
+-- Iteration 10 --
 
-Notice: Array to string conversion in %s on line %d
-int(1624097203)
+Warning: crc32() expects parameter 1 to be binary string, array given in %s on line %d
+NULL
 
--- Iteration 1 --
+-- Iteration 11 --
 
-Notice: Array to string conversion in %s on line %d
-int(1624097203)
+Warning: crc32() expects parameter 1 to be binary string, array given in %s on line %d
+NULL
 
--- Iteration 1 --
+-- Iteration 12 --
 
-Notice: Array to string conversion in %s on line %d
-int(1624097203)
+Warning: crc32() expects parameter 1 to be binary string, array given in %s on line %d
+NULL
 
--- Iteration 1 --
+-- Iteration 13 --
 
-Notice: Array to string conversion in %s on line %d
-int(1624097203)
+Warning: crc32() expects parameter 1 to be binary string, array given in %s on line %d
+NULL
 
--- Iteration 1 --
+-- Iteration 14 --
 
-Notice: Array to string conversion in %s on line %d
-int(1624097203)
+Warning: crc32() expects parameter 1 to be binary string, array given in %s on line %d
+NULL
 
--- Iteration 1 --
-int(0)
+-- Iteration 15 --
 
--- Iteration 1 --
-int(0)
+Warning: crc32() expects parameter 1 to be strictly a binary string, null given in %s on line %d
+NULL
 
--- Iteration 1 --
+-- Iteration 16 --
+
+Warning: crc32() expects parameter 1 to be strictly a binary string, null given in %s on line %d
+NULL
+
+-- Iteration 17 --
 int(-2082672713)
 
--- Iteration 1 --
+-- Iteration 18 --
 int(0)
 
--- Iteration 1 --
+-- Iteration 19 --
 int(-2082672713)
 
--- Iteration 1 --
+-- Iteration 20 --
 int(0)
 
--- Iteration 1 --
-int(0)
+-- Iteration 21 --
 
--- Iteration 1 --
-int(0)
+Warning: crc32() expects parameter 1 to be strictly a binary string, Unicode string given in %s on line %d
+NULL
 
--- Iteration 1 --
+-- Iteration 22 --
+
+Warning: crc32() expects parameter 1 to be strictly a binary string, Unicode string given in %s on line %d
+NULL
+
+-- Iteration 23 --
 int(-1465013268)
 
--- Iteration 1 --
-int(0)
+-- Iteration 24 --
 
--- Iteration 1 --
-int(0)
+Warning: crc32() expects parameter 1 to be strictly a binary string, null given in %s on line %d
+NULL
 
--- Iteration 1 --
-int(716753449)
+-- Iteration 25 --
+
+Warning: crc32() expects parameter 1 to be strictly a binary string, null given in %s on line %d
+NULL
+
+-- Iteration 26 --
+
+Warning: crc32() expects parameter 1 to be binary string, resource given in %s on line %d
+NULL
 Done
index 430e5c6dc1b50d17100edce8327551f95da13830..0b459b9cbced0156eff4ae9f4e8dd0694868f1dd 100644 (file)
@@ -9,6 +9,7 @@ Test strcspn() function : usage variations - unexpected values for str argument
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
 
 /*
 * Testing strspn() : with different unexpected values for str argument
@@ -49,8 +50,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -90,7 +91,7 @@ $values = array(
 // loop through each element of the array for str
 
 foreach($values as $value) {
-      echo "\n-- Iteration with str value as \"$value\" \n";
+      echo "\n-- Iteration with str value as \"$value\"\n";
       var_dump( strcspn($value,$mask) ); // with default args
       var_dump( strcspn($value,$mask,$start) );  // with default len value
       var_dump( strcspn($value,$mask,$start,$len) );  //  with all args
@@ -104,58 +105,52 @@ echo "Done"
 --EXPECTF--
 *** Testing strcspn() : with unexpected values for str argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with str value as "0" 
+-- Iteration with str value as "0"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "12345" 
+-- Iteration with str value as "12345"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "-2345" 
+-- Iteration with str value as "-2345"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "10.5" 
+-- Iteration with str value as "10.5"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "-10.5" 
+-- Iteration with str value as "-10.5"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "105000000000" 
+-- Iteration with str value as "101234567000"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "1.06E-9" 
+-- Iteration with str value as "1.07654321E-9"
 int(0)
 int(1)
 int(1)
 
--- Iteration with str value as "0.5" 
+-- Iteration with str value as "0.5"
 int(0)
 int(1)
 int(1)
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -166,9 +161,7 @@ NULL
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -179,9 +172,7 @@ NULL
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -192,9 +183,7 @@ NULL
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -205,9 +194,7 @@ NULL
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -218,62 +205,62 @@ NULL
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "object" 
+-- Iteration with str value as "object"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "Resource id #%d" 
+-- Iteration with str value as "Resource id #5"
 
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), resource given in %s on line %d
 NULL
@@ -284,62 +271,55 @@ NULL
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), resource given in %s on line %d
 NULL
 Done
-
 --UEXPECTF--
 *** Testing strcspn() : with unexpected values for str argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with str value as "0" 
+-- Iteration with str value as "0"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "12345" 
+-- Iteration with str value as "12345"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "-2345" 
+-- Iteration with str value as "-2345"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "10.5" 
+-- Iteration with str value as "10.5"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "-10.5" 
+-- Iteration with str value as "-10.5"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "105000000000" 
+-- Iteration with str value as "101234567000"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "1.06E-9" 
+-- Iteration with str value as "1.07654321E-9"
 int(0)
 int(1)
 int(1)
 
--- Iteration with str value as "0.5" 
+-- Iteration with str value as "0.5"
 int(0)
 int(1)
 int(1)
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -350,9 +330,7 @@ NULL
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -363,9 +341,7 @@ NULL
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -376,9 +352,7 @@ NULL
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -389,9 +363,7 @@ NULL
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -402,62 +374,62 @@ NULL
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "object" 
+-- Iteration with str value as "object"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "Resource id #%d" 
+-- Iteration with str value as "Resource id #5"
 
 Warning: strcspn() expects parameter 1 to be string (Unicode or binary), resource given in %s on line %d
 NULL
index c98907edc90d43762f31b0cabfef56697e488ad6..6b3e4a37bcccb6b730fbc2b4ce180eab2e3db94e 100644 (file)
@@ -9,6 +9,8 @@ Test strcspn() function : usage variations - unexpected values for mask argument
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
+
 /*
 * Testing strcspn() : with different unexpected values for mask argument
 */
@@ -47,8 +49,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -88,7 +90,7 @@ $values = array(
 // loop through each element of the array for mask
 
 foreach($values as $value) {
-      echo "\n-- Iteration with mask value as \"$value\" -- \n";
+      echo "\n-- Iteration with mask value as \"$value\" --\n";
       var_dump( strcspn($str,$value) );  // with defalut args
       var_dump( strcspn($str,$value,$start) );  // with default len value
       var_dump( strcspn($str,$value,$start,$len) );  // with all args
@@ -102,58 +104,63 @@ echo "Done"
 --EXPECTF--
 *** Testing strcspn() : with diferent unexpected values of mask argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with mask value as "0" -- 
+-- Iteration with mask value as "0" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "1" -- 
+-- Iteration with mask value as "1" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "12345" -- 
+-- Iteration with mask value as "12345" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "-2345" -- 
+-- Iteration with mask value as "-2345" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "10.5" -- 
+-- Iteration with mask value as "10.5" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "-10.5" -- 
+-- Iteration with mask value as "-10.5" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "105000000000" -- 
+-- Iteration with mask value as "101234567000" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "1.06E-9" -- 
+-- Iteration with mask value as "1.07654321E-9" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "0.5" -- 
+-- Iteration with mask value as "0.5" --
 int(10)
 int(9)
 int(9)
 
-Notice: Array to string conversion in %s on line %d
+-- Iteration with mask value as "Array" --
+
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
+NULL
 
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -164,22 +171,165 @@ NULL
 Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
+-- Iteration with mask value as "Array" --
+
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
+NULL
+
+-- Iteration with mask value as "Array" --
+
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
+NULL
+
+-- Iteration with mask value as "Array" --
+
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
+NULL
 
--- Iteration with mask value as "Array" -- 
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
+NULL
 
 Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "1" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "1" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "object" --
+int(1)
+int(0)
+int(0)
+
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "Resource id #5" --
+
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), resource given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), resource given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), resource given in %s on line %d
+NULL
+Done
+--UEXPECTF--
+*** Testing strcspn() : with diferent unexpected values of mask argument ***
+
+-- Iteration with mask value as "0" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "1" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "12345" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "-2345" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "10.5" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "-10.5" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "101234567000" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "1.07654321E-9" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "0.5" --
+int(10)
+int(9)
+int(9)
+
+-- Iteration with mask value as "Array" --
+
 Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
 Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
+NULL
 
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -190,22 +340,29 @@ NULL
 Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
+-- Iteration with mask value as "Array" --
 
--- Iteration with mask value as "Array" -- 
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
+NULL
+
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
+NULL
 
 Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
+-- Iteration with mask value as "Array" --
+
 Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
 Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
+Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
+NULL
 
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -216,62 +373,62 @@ NULL
 Warning: strcspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "1" -- 
+-- Iteration with mask value as "1" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "1" -- 
+-- Iteration with mask value as "1" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "object" -- 
+-- Iteration with mask value as "object" --
 int(1)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "Resource id #%d" -- 
+-- Iteration with mask value as "Resource id #5" --
 
 Warning: strcspn() expects parameter 2 to be string (Unicode or binary), resource given in %s on line %d
 NULL
index 1c31d9f7c56c4137a34ffefc474f1714d67901df..ae84f51cd50a6fcf15b17018f1bfd1322d06bc31 100644 (file)
@@ -2,13 +2,15 @@
 Test strcspn() function : usage variations - unexpected values of start argument
 --FILE--
 <?php
-/* Prototype  : proto int strcspn(string str, string mask [, start [, len]])
+/* Prototype  : proto int strcspn(string str, string mask [,int start [,int len]])
  * Description: Finds length of initial segment consisting entirely of characters not found in mask.
                 If start or/and length is provided works like strcspn(substr($s,$start,$len),$bad_chars) 
  * Source code: ext/standard/string.c
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
+
 /*
 * Testing strcspn() : with unexpected values of start argument
 */
@@ -41,8 +43,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -99,10 +101,6 @@ echo "Done"
 --EXPECTF--
 *** Testing strcspn() : with unexpected values of start argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
 -- Iteration with start value as "10.5" --
 int(0)
 int(0)
@@ -111,11 +109,11 @@ int(0)
 int(0)
 int(0)
 
--- Iteration with start value as "105000000000" --
-bool(false)
-bool(false)
+-- Iteration with start value as "101234567000" --
+int(0)
+int(0)
 
--- Iteration with start value as "1.06E-9" --
+-- Iteration with start value as "1.07654321E-9" --
 int(0)
 int(0)
 
@@ -123,18 +121,14 @@ int(0)
 int(0)
 int(0)
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
-Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 3 to be long, array given in %s on line 89
 NULL
 
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
@@ -143,8 +137,6 @@ NULL
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
@@ -153,8 +145,6 @@ NULL
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
@@ -163,8 +153,6 @@ NULL
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
@@ -253,14 +241,9 @@ NULL
 Warning: strcspn() expects parameter 3 to be long, resource given in %s on line %d
 NULL
 Done
-
 --UEXPECTF--
 *** Testing strcspn() : with unexpected values of start argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
 -- Iteration with start value as "10.5" --
 int(0)
 int(0)
@@ -269,11 +252,11 @@ int(0)
 int(0)
 int(0)
 
--- Iteration with start value as "105000000000" --
-bool(false)
-bool(false)
+-- Iteration with start value as "101234567000" --
+int(0)
+int(0)
 
--- Iteration with start value as "1.06E-9" --
+-- Iteration with start value as "1.07654321E-9" --
 int(0)
 int(0)
 
@@ -281,8 +264,6 @@ int(0)
 int(0)
 int(0)
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
@@ -291,8 +272,6 @@ NULL
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
@@ -301,8 +280,6 @@ NULL
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
@@ -311,8 +288,6 @@ NULL
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
@@ -321,8 +296,6 @@ NULL
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
@@ -403,7 +376,7 @@ int(0)
 int(0)
 int(0)
 
--- Iteration with start value as "Resource id #%d" --
+-- Iteration with start value as "Resource id #5" --
 
 Warning: strcspn() expects parameter 3 to be long, resource given in %s on line %d
 NULL
index 9435d0c75c0eb73cf882256cb303f043fbdd928a..9251497eb5e74caf6a0fb9287b2680ebc6dc763c 100644 (file)
@@ -9,6 +9,8 @@ Test strcspn() function : usage variations - unexpected values of len argument
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
+
 /*
 * Testing strcspn() : with unexpected values of len argument
 */
@@ -41,8 +43,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -98,55 +100,41 @@ echo "Done"
 --EXPECTF--
 *** Testing strcspn() : with unexpected values of len argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
 -- Iteration with len value as "10.5" --
 int(0)
 
 -- Iteration with len value as "-10.5" --
 int(0)
 
--- Iteration with len value as "105000000000" --
+-- Iteration with len value as "101234567000" --
 int(0)
 
--- Iteration with len value as "1.06E-9" --
+-- Iteration with len value as "1.07654321E-9" --
 int(0)
 
 -- Iteration with len value as "0.5" --
 int(0)
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
@@ -206,59 +194,44 @@ int(0)
 Warning: strcspn() expects parameter 4 to be long, resource given in %s on line %d
 NULL
 Done
-
 --UEXPECTF--
 *** Testing strcspn() : with unexpected values of len argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
 -- Iteration with len value as "10.5" --
 int(0)
 
 -- Iteration with len value as "-10.5" --
 int(0)
 
--- Iteration with len value as "105000000000" --
+-- Iteration with len value as "101234567000" --
 int(0)
 
--- Iteration with len value as "1.06E-9" --
+-- Iteration with len value as "1.07654321E-9" --
 int(0)
 
 -- Iteration with len value as "0.5" --
 int(0)
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strcspn() expects parameter 4 to be long, array given in %s on line %d
@@ -313,7 +286,7 @@ int(0)
 -- Iteration with len value as "" --
 int(0)
 
--- Iteration with len value as "Resource id #%d" --
+-- Iteration with len value as "Resource id #5" --
 
 Warning: strcspn() expects parameter 4 to be long, resource given in %s on line %d
 NULL
index b2d23f8d234a71319d61b5de5d562a382d374d39..3410ce581952cf5080156b80b38d1b3c3a4270e7 100644 (file)
@@ -2,13 +2,15 @@
 Test strspn() function : usage variations - unexpected values for str argument
 --FILE--
 <?php
-/* Prototype  : int strspn(string str, string mask [, int start [, int len]])
+/* Prototype  : proto int strspn(string str, string mask [, int start [, int len]])
  * Description: Finds length of initial segment consisting entirely of characters found in mask.
                 If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars) 
  * Source code: ext/standard/string.c
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
+
 /*
 * Testing strspn() : with different unexpected values for str argument
 */
@@ -48,8 +50,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -89,7 +91,7 @@ $values = array(
 // loop through each element of the array for str
 
 foreach($values as $value) {
-      echo "\n-- Iteration with str value as \"$value\" \n";
+      echo "\n-- Iteration with str value as \"$value\"\n";
       var_dump( strspn($value,$mask) ); // with default args
       var_dump( strspn($value,$mask,$start) );  // with default len value
       var_dump( strspn($value,$mask,$start,$len) );  //  with all args
@@ -103,58 +105,52 @@ echo "Done"
 --EXPECTF--
 *** Testing strspn() : with unexpected values for str argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with str value as "0" 
+-- Iteration with str value as "0"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "12345" 
+-- Iteration with str value as "12345"
 int(5)
 int(4)
 int(4)
 
--- Iteration with str value as "-2345" 
+-- Iteration with str value as "-2345"
 int(0)
 int(4)
 int(4)
 
--- Iteration with str value as "10.5" 
+-- Iteration with str value as "10.5"
 int(2)
 int(1)
 int(1)
 
--- Iteration with str value as "-10.5" 
+-- Iteration with str value as "-10.5"
 int(0)
 int(2)
 int(2)
 
--- Iteration with str value as "105000000000" 
+-- Iteration with str value as "101234567000"
 int(12)
 int(11)
 int(10)
 
--- Iteration with str value as "1.06E-9" 
+-- Iteration with str value as "1.07654321E-9"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "0.5" 
+-- Iteration with str value as "0.5"
 int(1)
 int(0)
 int(0)
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -165,9 +161,7 @@ NULL
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -178,9 +172,7 @@ NULL
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -191,9 +183,7 @@ NULL
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -204,9 +194,7 @@ NULL
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -217,62 +205,62 @@ NULL
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "object" 
+-- Iteration with str value as "object"
 int(2)
 int(1)
 int(1)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "Resource id #%d" 
+-- Iteration with str value as "Resource id #%d"
 
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), resource given in %s on line %d
 NULL
@@ -283,62 +271,55 @@ NULL
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), resource given in %s on line %d
 NULL
 Done
-
 --UEXPECTF--
 *** Testing strspn() : with unexpected values for str argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with str value as "0" 
+-- Iteration with str value as "0"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "12345" 
+-- Iteration with str value as "12345"
 int(5)
 int(4)
 int(4)
 
--- Iteration with str value as "-2345" 
+-- Iteration with str value as "-2345"
 int(0)
 int(4)
 int(4)
 
--- Iteration with str value as "10.5" 
+-- Iteration with str value as "10.5"
 int(2)
 int(1)
 int(1)
 
--- Iteration with str value as "-10.5" 
+-- Iteration with str value as "-10.5"
 int(0)
 int(2)
 int(2)
 
--- Iteration with str value as "105000000000" 
+-- Iteration with str value as "101234567000"
 int(12)
 int(11)
 int(10)
 
--- Iteration with str value as "1.06E-9" 
+-- Iteration with str value as "1.07654321E-9"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "0.5" 
+-- Iteration with str value as "0.5"
 int(1)
 int(0)
 int(0)
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -349,9 +330,7 @@ NULL
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -362,9 +341,7 @@ NULL
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -375,9 +352,7 @@ NULL
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -388,9 +363,7 @@ NULL
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -401,62 +374,62 @@ NULL
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "object" 
+-- Iteration with str value as "object"
 int(2)
 int(1)
 int(1)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "Resource id #%d" 
+-- Iteration with str value as "Resource id #%d"
 
 Warning: strspn() expects parameter 1 to be string (Unicode or binary), resource given in %s on line %d
 NULL
index 1b874118982b9c6a9cc106f985b8a55fb3f0bd22..30219f7bc7e1bd8fddfec66237f87c6e5ea6b1a6 100644 (file)
@@ -2,13 +2,15 @@
 Test strspn() function : usage variations - unexpected values for mask argument
 --FILE--
 <?php
-/* Prototype  : int strspn(string str, string mask [, int start [, int len]])
+/* Prototype  : proto int strspn(string str, string mask [, int start [, int len]])
  * Description: Finds length of initial segment consisting entirely of characters found in mask.
                If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars) 
  * Source code: ext/standard/string.c
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
+
 /*
 * Testing strspn() : with different unexpected values for mask argument
 */
@@ -47,8 +49,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -88,7 +90,7 @@ $values = array(
 // loop through each element of the array for mask
 
 foreach($values as $value) {
-      echo "\n-- Iteration with mask value as \"$value\" -- \n";
+      echo "\n-- Iteration with mask value as \"$value\" --\n";
       var_dump( strspn($str,$value) );  // with defalut args
       var_dump( strspn($str,$value,$start) );  // with default len value
       var_dump( strspn($str,$value,$start,$len) );  // with all args
@@ -102,58 +104,52 @@ echo "Done"
 --EXPECTF--
 *** Testing strspn() : with diferent unexpected values of mask argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with mask value as "0" -- 
+-- Iteration with mask value as "0" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "1" -- 
+-- Iteration with mask value as "1" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "12345" -- 
+-- Iteration with mask value as "12345" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "-2345" -- 
+-- Iteration with mask value as "-2345" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "10.5" -- 
+-- Iteration with mask value as "10.5" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "-10.5" -- 
+-- Iteration with mask value as "-10.5" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "105000000000" -- 
+-- Iteration with mask value as "101234567000" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "1.06E-9" -- 
+-- Iteration with mask value as "1.07654321E-9" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "0.5" -- 
+-- Iteration with mask value as "0.5" --
 int(0)
 int(0)
 int(0)
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -164,9 +160,7 @@ NULL
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -177,9 +171,7 @@ NULL
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -190,9 +182,7 @@ NULL
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -203,9 +193,7 @@ NULL
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -216,62 +204,62 @@ NULL
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "1" -- 
+-- Iteration with mask value as "1" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "1" -- 
+-- Iteration with mask value as "1" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "object" -- 
+-- Iteration with mask value as "object" --
 int(0)
 int(1)
 int(1)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "Resource id #%d" -- 
+-- Iteration with mask value as "Resource id #%d" --
 
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), resource given in %s on line %d
 NULL
@@ -282,62 +270,55 @@ NULL
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), resource given in %s on line %d
 NULL
 Done
-
 --UEXPECTF--
 *** Testing strspn() : with diferent unexpected values of mask argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with mask value as "0" -- 
+-- Iteration with mask value as "0" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "1" -- 
+-- Iteration with mask value as "1" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "12345" -- 
+-- Iteration with mask value as "12345" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "-2345" -- 
+-- Iteration with mask value as "-2345" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "10.5" -- 
+-- Iteration with mask value as "10.5" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "-10.5" -- 
+-- Iteration with mask value as "-10.5" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "105000000000" -- 
+-- Iteration with mask value as "101234567000" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "1.06E-9" -- 
+-- Iteration with mask value as "1.07654321E-9" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "0.5" -- 
+-- Iteration with mask value as "0.5" --
 int(0)
 int(0)
 int(0)
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -348,9 +329,7 @@ NULL
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -361,9 +340,7 @@ NULL
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -374,9 +351,7 @@ NULL
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -387,9 +362,7 @@ NULL
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
@@ -400,62 +373,62 @@ NULL
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), array given in %s on line %d
 NULL
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "1" -- 
+-- Iteration with mask value as "1" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "1" -- 
+-- Iteration with mask value as "1" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "object" -- 
+-- Iteration with mask value as "object" --
 int(0)
 int(1)
 int(1)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "Resource id #%d" -- 
+-- Iteration with mask value as "Resource id #%d" --
 
 Warning: strspn() expects parameter 2 to be string (Unicode or binary), resource given in %s on line %d
 NULL
index 7e1b04f530a540bc339232787ac6165b02362168..541155938be6859961157d4dd558e1f22e6f199d 100644 (file)
@@ -2,13 +2,15 @@
 Test strspn() function : usage variations - unexpected values of start argument
 --FILE--
 <?php
-/* Prototype  : int strspn(string str, string mask [, int start [, int len]])
+/* Prototype  : proto int strspn(string str, string mask [, int start [, int len]])
  * Description: Finds length of initial segment consisting entirely of characters found in mask.
                 If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars) 
  * Source code: ext/standard/string.c
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
+
 /*
 * Testing strspn() : with unexpected values of start argument
 */
@@ -41,8 +43,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -99,10 +101,6 @@ echo "Done"
 --EXPECTF--
 *** Testing strspn() : with unexpected values of start argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
 -- Iteration with start value as "10.5" --
 int(0)
 int(0)
@@ -111,11 +109,11 @@ int(0)
 int(2)
 int(2)
 
--- Iteration with start value as "105000000000" --
-bool(false)
-bool(false)
+-- Iteration with start value as "101234567000" --
+int(2)
+int(2)
 
--- Iteration with start value as "1.06E-9" --
+-- Iteration with start value as "1.07654321E-9" --
 int(2)
 int(2)
 
@@ -123,8 +121,6 @@ int(2)
 int(2)
 int(2)
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
@@ -133,8 +129,6 @@ NULL
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
@@ -143,8 +137,6 @@ NULL
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
@@ -153,8 +145,6 @@ NULL
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
@@ -163,8 +153,6 @@ NULL
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
@@ -253,14 +241,9 @@ NULL
 Warning: strspn() expects parameter 3 to be long, resource given in %s on line %d
 NULL
 Done
-
 --UEXPECTF--
 *** Testing strspn() : with unexpected values of start argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
 -- Iteration with start value as "10.5" --
 int(0)
 int(0)
@@ -269,11 +252,11 @@ int(0)
 int(2)
 int(2)
 
--- Iteration with start value as "105000000000" --
-bool(false)
-bool(false)
+-- Iteration with start value as "101234567000" --
+int(2)
+int(2)
 
--- Iteration with start value as "1.06E-9" --
+-- Iteration with start value as "1.07654321E-9" --
 int(2)
 int(2)
 
@@ -281,8 +264,6 @@ int(2)
 int(2)
 int(2)
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
@@ -291,8 +272,6 @@ NULL
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
@@ -301,8 +280,6 @@ NULL
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
@@ -311,8 +288,6 @@ NULL
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
@@ -321,8 +296,6 @@ NULL
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with start value as "Array" --
 
 Warning: strspn() expects parameter 3 to be long, array given in %s on line %d
@@ -403,7 +376,7 @@ int(2)
 int(2)
 int(2)
 
--- Iteration with start value as "Resource id #%d" --
+-- Iteration with start value as "Resource id #5" --
 
 Warning: strspn() expects parameter 3 to be long, resource given in %s on line %d
 NULL
index 44473a460b71b6235169a54f59fc9fdb57a96d28..3d527940452a95e0eb88d7500da0f43a89f2ca60 100644 (file)
@@ -2,13 +2,15 @@
 Test strspn() function : usage variations - unexpected values of len argument
 --FILE--
 <?php
-/* Prototype  : int strspn(string str, string mask [, int start [, int len]])
+/* Prototype  : proto int strspn(string str, string mask [, int start [, int len]])
  * Description: Finds length of initial segment consisting entirely of characters found in mask.
                 If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars) 
  * Source code: ext/standard/string.c
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
+
 /*
 * Testing strspn() : with unexpected values of len argument
 */
@@ -41,8 +43,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -98,55 +100,41 @@ echo "Done"
 --EXPECTF--
 *** Testing strspn() : with unexpected values of len argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
 -- Iteration with len value as "10.5" --
 int(2)
 
 -- Iteration with len value as "-10.5" --
 int(0)
 
--- Iteration with len value as "105000000000" --
-int(2)
+-- Iteration with len value as "101234567000" --
+int(0)
 
--- Iteration with len value as "1.06E-9" --
+-- Iteration with len value as "1.07654321E-9" --
 int(0)
 
 -- Iteration with len value as "0.5" --
 int(0)
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strspn() expects parameter 4 to be long, array given in %s on line %d
@@ -206,59 +194,44 @@ int(0)
 Warning: strspn() expects parameter 4 to be long, resource given in %s on line %d
 NULL
 Done
-
 --UEXPECTF--
 *** Testing strspn() : with unexpected values of len argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
 -- Iteration with len value as "10.5" --
 int(2)
 
 -- Iteration with len value as "-10.5" --
 int(0)
 
--- Iteration with len value as "105000000000" --
-int(2)
+-- Iteration with len value as "101234567000" --
+int(0)
 
--- Iteration with len value as "1.06E-9" --
+-- Iteration with len value as "1.07654321E-9" --
 int(0)
 
 -- Iteration with len value as "0.5" --
 int(0)
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strspn() expects parameter 4 to be long, array given in %s on line %d
 NULL
 
-Notice: Array to string conversion in %s on line %d
-
 -- Iteration with len value as "Array" --
 
 Warning: strspn() expects parameter 4 to be long, array given in %s on line %d
@@ -313,7 +286,7 @@ int(0)
 -- Iteration with len value as "" --
 int(0)
 
--- Iteration with len value as "Resource id #%d" --
+-- Iteration with len value as "Resource id #5" --
 
 Warning: strspn() expects parameter 4 to be long, resource given in %s on line %d
 NULL
index 3d29cd8a93aa51da96d27dda4a3348cb9c9523f6..50d610634ed6c554c5765f937a8b0ae50e260fc5 100644 (file)
@@ -41,8 +41,8 @@ $values =  array (
   // float values
   10.5,
   -10.5,
-  10.5e10,
-  10.6E-10,
+  10.1234567e10,
+  10.7654321E-10,
   .5,
 
   // array values
@@ -120,9 +120,9 @@ string(4) "10.5"
 -- Iteration 6 --
 string(4) "10.5"
 -- Iteration 7 --
-string(12) "105000000000"
+string(12) "101234567000"
 -- Iteration 8 --
-string(5) "1.06E"
+string(11) "1.07654321E"
 -- Iteration 9 --
 string(3) "0.5"
 -- Iteration 10 --
@@ -172,7 +172,6 @@ bool(false)
 Warning: strtok() expects parameter 1 to be string (Unicode or binary), resource given in %s on line %d
 NULL
 Done
-
 --UEXPECTF--
 *** Testing strtok() : with first argument as non-string ***
 
@@ -194,9 +193,9 @@ unicode(4) "10.5"
 -- Iteration 6 --
 unicode(4) "10.5"
 -- Iteration 7 --
-unicode(12) "105000000000"
+unicode(12) "101234567000"
 -- Iteration 8 --
-unicode(5) "1.06E"
+unicode(11) "1.07654321E"
 -- Iteration 9 --
 unicode(3) "0.5"
 -- Iteration 10 --
index 5cd93b029bb6a7652f723371f912034f494b0cf5..27666699fe5eaca5e953ea2d782af8d1065bab50 100644 (file)
@@ -49,8 +49,8 @@ $values =  array (
   // float values
   10.5,
   -10.5,
-  10.5e10,
-  10.6E-10,
+  10.1234567e10,
+  10.7654321E-10,
   .5,
 
   // array values
@@ -139,9 +139,9 @@ string(4) "10.5"
 -- Iteration 12 --
 string(5) "-10.5"
 -- Iteration 13 --
-string(12) "105000000000"
+string(12) "101234567000"
 -- Iteration 14 --
-string(7) "1.06E-9"
+string(13) "1.07654321E-9"
 -- Iteration 15 --
 string(3) "0.5"
 -- Iteration 16 --
@@ -228,9 +228,9 @@ unicode(4) "10.5"
 -- Iteration 12 --
 unicode(5) "-10.5"
 -- Iteration 13 --
-unicode(12) "105000000000"
+unicode(12) "101234567000"
 -- Iteration 14 --
-unicode(7) "1.06E-9"
+unicode(13) "1.07654321E-9"
 -- Iteration 15 --
 unicode(3) "0.5"
 -- Iteration 16 --