1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/standard/tests/array/bug77931.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

27 lines
573 B
PHP

--TEST--
Bug #77931: Warning for array_map mentions wrong type
--FILE--
<?php
try {
array_map('trim', array(), 1);
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
try {
array_map('trim', array(), array(), true);
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
try {
array_map('trim', array(), array(), array(), null);
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Expected parameter 3 to be an array, int given
Expected parameter 4 to be an array, bool given
Expected parameter 5 to be an array, null given