Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Zend/tests/type_declarations/scalar_return_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ $values = [
[],
new StdClass,
new StringCapable,
fopen("data:text/plain,foobar", "r")
STDERR,
];

foreach ($functions as $type => $function) {
Expand Down Expand Up @@ -92,13 +92,13 @@ int(0)
*** Trying array(0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type int, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type int, stdClass returned in %s on line %d
*** Trying object(StringCapable)#7 (0) {
*** Trying object(StringCapable)#%d (0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type int, StringCapable returned in %s on line %d
*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Return value must be of type int, resource returned in %s on line %d

Testing 'float' type:
Expand Down Expand Up @@ -129,13 +129,13 @@ float(0)
*** Trying array(0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type float, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type float, stdClass returned in %s on line %d
*** Trying object(StringCapable)#7 (0) {
*** Trying object(StringCapable)#%d (0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type float, StringCapable returned in %s on line %d
*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Return value must be of type float, resource returned in %s on line %d

Testing 'string' type:
Expand Down Expand Up @@ -166,13 +166,13 @@ string(0) ""
*** Trying array(0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type string, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type string, stdClass returned in %s on line %d
*** Trying object(StringCapable)#7 (0) {
*** Trying object(StringCapable)#%d (0) {
}
string(6) "foobar"
*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Return value must be of type string, resource returned in %s on line %d

Testing 'bool' type:
Expand Down Expand Up @@ -203,13 +203,13 @@ bool(false)
*** Trying array(0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type bool, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type bool, stdClass returned in %s on line %d
*** Trying object(StringCapable)#7 (0) {
*** Trying object(StringCapable)#%d (0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type bool, StringCapable returned in %s on line %d
*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Return value must be of type bool, resource returned in %s on line %d

Done
26 changes: 13 additions & 13 deletions Zend/tests/type_declarations/scalar_return_basic_64bit.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ $values = [
[],
new StdClass,
new StringCapable,
fopen("data:text/plain,foobar", "r")
STDERR,
];

foreach ($functions as $type => $function) {
Expand Down Expand Up @@ -92,13 +92,13 @@ int(0)
*** Trying array(0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type int, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type int, stdClass returned in %s on line %d
*** Trying object(StringCapable)#7 (0) {
*** Trying object(StringCapable)#%d (0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type int, StringCapable returned in %s on line %d
*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Return value must be of type int, resource returned in %s on line %d

Testing 'float' type:
Expand Down Expand Up @@ -129,13 +129,13 @@ float(0)
*** Trying array(0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type float, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type float, stdClass returned in %s on line %d
*** Trying object(StringCapable)#7 (0) {
*** Trying object(StringCapable)#%d (0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type float, StringCapable returned in %s on line %d
*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Return value must be of type float, resource returned in %s on line %d

Testing 'string' type:
Expand Down Expand Up @@ -166,13 +166,13 @@ string(0) ""
*** Trying array(0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type string, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type string, stdClass returned in %s on line %d
*** Trying object(StringCapable)#7 (0) {
*** Trying object(StringCapable)#%d (0) {
}
string(6) "foobar"
*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Return value must be of type string, resource returned in %s on line %d

Testing 'bool' type:
Expand Down Expand Up @@ -203,13 +203,13 @@ bool(false)
*** Trying array(0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type bool, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type bool, stdClass returned in %s on line %d
*** Trying object(StringCapable)#7 (0) {
*** Trying object(StringCapable)#%d (0) {
}
*** Caught {closure:%s:%d}(): Return value must be of type bool, StringCapable returned in %s on line %d
*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Return value must be of type bool, resource returned in %s on line %d

Done
24 changes: 12 additions & 12 deletions Zend/tests/type_declarations/scalar_strict.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ int(2147483647)
}
*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d

*** Trying object(stdClass)#5 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, stdClass given, called in %s on line %d

*** Trying object(StringCapable)#6 (0) {
*** Trying object(StringCapable)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, StringCapable given, called in %s on line %d

*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, resource given, called in %s on line %d

Testing 'float' type:
Expand Down Expand Up @@ -149,15 +149,15 @@ float(NAN)
}
*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, array given, called in %s on line %d

*** Trying object(stdClass)#5 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, stdClass given, called in %s on line %d

*** Trying object(StringCapable)#6 (0) {
*** Trying object(StringCapable)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, StringCapable given, called in %s on line %d

*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, resource given, called in %s on line %d

Testing 'string' type:
Expand Down Expand Up @@ -202,15 +202,15 @@ string(0) ""
}
*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, array given, called in %s on line %d

*** Trying object(stdClass)#5 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, stdClass given, called in %s on line %d

*** Trying object(StringCapable)#6 (0) {
*** Trying object(StringCapable)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, StringCapable given, called in %s on line %d

*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, resource given, called in %s on line %d

Testing 'bool' type:
Expand Down Expand Up @@ -255,15 +255,15 @@ bool(false)
}
*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, array given, called in %s on line %d

*** Trying object(stdClass)#5 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, stdClass given, called in %s on line %d

*** Trying object(StringCapable)#6 (0) {
*** Trying object(StringCapable)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, StringCapable given, called in %s on line %d

*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, resource given, called in %s on line %d

Done
26 changes: 13 additions & 13 deletions Zend/tests/type_declarations/scalar_strict_64bit.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $values = [
[],
new StdClass,
new StringCapable,
fopen("data:text/plain,foobar", "r")
STDERR,
];

foreach ($functions as $type => $function) {
Expand Down Expand Up @@ -96,15 +96,15 @@ int(9223372036854775807)
}
*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d

*** Trying object(stdClass)#5 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, stdClass given, called in %s on line %d

*** Trying object(StringCapable)#6 (0) {
*** Trying object(StringCapable)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, StringCapable given, called in %s on line %d

*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Argument #1 ($i) must be of type int, resource given, called in %s on line %d

Testing 'float' type:
Expand Down Expand Up @@ -149,15 +149,15 @@ float(NAN)
}
*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, array given, called in %s on line %d

*** Trying object(stdClass)#5 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, stdClass given, called in %s on line %d

*** Trying object(StringCapable)#6 (0) {
*** Trying object(StringCapable)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, StringCapable given, called in %s on line %d

*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Argument #1 ($f) must be of type float, resource given, called in %s on line %d

Testing 'string' type:
Expand Down Expand Up @@ -202,15 +202,15 @@ string(0) ""
}
*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, array given, called in %s on line %d

*** Trying object(stdClass)#5 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, stdClass given, called in %s on line %d

*** Trying object(StringCapable)#6 (0) {
*** Trying object(StringCapable)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, StringCapable given, called in %s on line %d

*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Argument #1 ($s) must be of type string, resource given, called in %s on line %d

Testing 'bool' type:
Expand Down Expand Up @@ -255,15 +255,15 @@ bool(false)
}
*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, array given, called in %s on line %d

*** Trying object(stdClass)#5 (0) {
*** Trying object(stdClass)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, stdClass given, called in %s on line %d

*** Trying object(StringCapable)#6 (0) {
*** Trying object(StringCapable)#%d (0) {
}
*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, StringCapable given, called in %s on line %d

*** Trying resource(5) of type (stream)
*** Trying resource(%d) of type (stream)
*** Caught {closure:%s:%d}(): Argument #1 ($b) must be of type bool, resource given, called in %s on line %d

Done
4 changes: 2 additions & 2 deletions ext/opcache/tests/jit/fetch_obj_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ object(stdClass)#%d (2) {
}
object(stdClass)#%d (2) {
["a"]=>
&resource(5) of type (stream)
&resource(%d) of type (stream)
["b"]=>
array(0) {
}
Expand All @@ -122,7 +122,7 @@ object(stdClass)#%d (2) {
}
object(stdClass)#%d (2) {
["a"]=>
&resource(6) of type (stream)
&resource(%d) of type (stream)
["b"]=>
array(0) {
}
Expand Down
15 changes: 6 additions & 9 deletions ext/standard/tests/array/array_map_variation4.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ function callback($a)
$unset_var = 10;
unset ($unset_var);

// get a resource variable
$fp = fopen(__FILE__, "r");

// get a class
class classA{
public function __toString(){
Expand Down Expand Up @@ -49,11 +46,11 @@ $arrays = array (
array("hello", $heredoc => "string"), // heredoc

// array with object, unset variable and resource variable
array(@$unset_var => "hello", $fp => 'resource'),
array(@$unset_var => "hello", STDERR => 'resource'),

// array with mixed values
/*11*/ array('hello' => 1, "fruit" => 2.2,
$fp => 'resource', 133 => "int",
STDERR => 'resource', 133 => "int",
@$unset_var => "unset", $heredoc => "heredoc")
);

Expand All @@ -70,9 +67,9 @@ echo "Done";
--EXPECTF--
*** Testing array_map() : associative array with diff. keys for 'arr1' argument ***

Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line %d

Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line %d
-- Iteration 1 --
array(0) {
}
Expand Down Expand Up @@ -131,7 +128,7 @@ array(2) {
array(2) {
[""]=>
string(5) "hello"
[5]=>
[3]=>
string(8) "resource"
}
-- Iteration 9 --
Expand All @@ -140,7 +137,7 @@ array(6) {
int(1)
["fruit"]=>
float(2.2)
[5]=>
[3]=>
string(8) "resource"
[133]=>
string(3) "int"
Expand Down
Loading
Loading