--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
*/
//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) );
-- 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) " "
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 --
-- 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 --
--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";
//Class to get object variable
class MyClass
{
- public function __tostring() {
+ public function __toString() {
return "object";
}
}
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array data
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 --
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
//Class to get object variable
class MyClass
{
- public function __tostring()
+ public function __toString()
{
return "object";
}
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.123456e10,
+ 10.7654321E-10,
.5,
// array data
-- 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."
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 --
-- 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 --
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array data
$count = 1;
foreach($values as $value) {
echo "\n-- Iteration $count --\n";
- var_dump( crc32((binary)$value) );
+ var_dump( crc32($value) );
+ $count++;
};
// closing the resource
-- 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 ***
-- 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
* Alias to functions: none
*/
+error_reporting(E_ALL & ~E_NOTICE);
/*
* Testing strspn() : with different unexpected values for str argument
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array data
// 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
--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
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
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
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
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
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
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
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
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
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
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
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
* Alias to functions: none
*/
+error_reporting(E_ALL & ~E_NOTICE);
+
/*
* Testing strcspn() : with different unexpected values for mask argument
*/
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array data
// 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
--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
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
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
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
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
*/
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array data
--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)
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)
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
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
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
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
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)
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)
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 %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
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
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
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
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
* Alias to functions: none
*/
+error_reporting(E_ALL & ~E_NOTICE);
+
/*
* Testing strcspn() : with unexpected values of len argument
*/
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array data
--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
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
-- 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
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
*/
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array data
// 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
--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
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
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
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
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
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
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
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
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
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
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
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
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
*/
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array data
// 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
--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
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
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
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
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
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
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
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
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
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
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
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
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
*/
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array data
--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)
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)
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
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
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
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
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
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)
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)
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
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
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
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
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
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
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
*/
// float data
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array data
--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
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
-- 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
// float values
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array values
-- 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 --
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 ***
-- 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 --
// float values
10.5,
-10.5,
- 10.5e10,
- 10.6E-10,
+ 10.1234567e10,
+ 10.7654321E-10,
.5,
// array values
-- 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 --
-- 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 --