mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
This is manual type and argument number checking code that was not covered by the zpp move to TypeErrors.
20 lines
300 B
PHP
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!
|