1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/standard/tests/array/array_diff_1.phpt
2020-03-18 19:56:10 +01:00

20 lines
319 B
PHP

--TEST--
Test array_diff when non-array is passed
--FILE--
<?php
//-=-=-=-=-
$a = array();
$b = 3;
$c = array(5);
try {
array_diff($a, $b, $c);
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
//-=-=-=-=-=-
echo "OK!";
?>
--EXPECT--
array_diff(): Argument #2 ($arr2) must be of type array, int given
OK!