1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/standard/tests/array/array_diff_1.phpt
Nikita Popov 4e391ee3a3 Convert some warnings to TypeErrors in array functions
This is manual type and argument number checking code that was not
covered by the zpp move to TypeErrors.
2019-05-31 10:52:06 +02:00

20 lines
300 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!";
?>
--EXPECTF--
Expected parameter 2 to be an array, int given
OK!