diff options
author | SVN Migration <svn@php.net> | 2008-12-03 20:30:45 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2008-12-03 20:30:45 +0000 |
commit | 2876046398950e59c3b3c460e67e6fec7ff2ba3c (patch) | |
tree | 33b2b8b4b859960a6446ad19d0ada1c55f9cfcda /ext/standard/tests/array/array_intersect_variation5.phpt | |
parent | 3fb86b0b9e79e6a3312b694f30ee627e2e1b325c (diff) | |
download | php-git-php-5.3.0alpha2.tar.gz |
This commit was manufactured by cvs2svn to create tag 'php_5_3_0alpha2'.php-5.3.0alpha2
Diffstat (limited to 'ext/standard/tests/array/array_intersect_variation5.phpt')
-rw-r--r-- | ext/standard/tests/array/array_intersect_variation5.phpt | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/ext/standard/tests/array/array_intersect_variation5.phpt b/ext/standard/tests/array/array_intersect_variation5.phpt index 9aaedeb382..7f36ee3f2e 100644 --- a/ext/standard/tests/array/array_intersect_variation5.phpt +++ b/ext/standard/tests/array/array_intersect_variation5.phpt @@ -19,6 +19,17 @@ echo "*** Testing array_intersect() : assoc array with diff keys to \$arr1 argum $unset_var = 10; unset ($unset_var); +// get a resource variable +$fp = fopen(__FILE__, "r"); + +// get a class +class classA +{ + public function __toString(){ + return "Class A object"; + } +} + // get a heredoc string $heredoc = <<<EOT Hello world @@ -48,12 +59,12 @@ $arrays = array ( "\v\fworld" => 2.2, "pen\n" => 33), array("hello", $heredoc => "string"), // heredoc - // array with unset variable -/*10*/ array( @$unset_var => "hello"), + // array with object, unset variable and resource variable +/*10*/ array(new classA() => 11, @$unset_var => "hello", $fp => 'resource'), // array with mixed keys -/*11*/ array('hello' => 1, "fruit" => 2.2, - 133 => "int", 444.432 => "float", +/*11*/ array('hello' => 1, new classA() => 2, "fruit" => 2.2, + $fp => 'resource', 133 => "int", 444.432 => "float", @$unset_var => "unset", $heredoc => "heredoc") ); @@ -74,10 +85,21 @@ foreach($arrays as $arr1) { $iterator++; } +// close the file resource used +fclose($fp); + echo "Done"; ?> --EXPECTF-- *** Testing array_intersect() : assoc array with diff keys to $arr1 argument *** + +Warning: Illegal offset type in %s on line %d + +Warning: Illegal offset type in %s on line %d + +Warning: Illegal offset type in %s on line %d + +Warning: Illegal offset type in %s on line %d -- Iterator 1 -- array(0) { } |