mirror of
https://github.com/php/php-src.git
synced 2024-12-15 21:05:51 +08:00
9b7ba01618
add test
27 lines
487 B
PHP
27 lines
487 B
PHP
--TEST--
|
|
str_word_count() and invalid arguments
|
|
--FILE--
|
|
<?php
|
|
|
|
var_dump(str_word_count(""));
|
|
var_dump(str_word_count("", -1));
|
|
var_dump(str_word_count("", -1, $a));
|
|
var_dump($a);
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
int(0)
|
|
|
|
Warning: str_word_count(): Invalid format value -1 in %s on line %d
|
|
bool(false)
|
|
|
|
Notice: Undefined variable: a in %s on line %d
|
|
|
|
Warning: str_word_count(): Invalid format value -1 in %s on line %d
|
|
bool(false)
|
|
|
|
Notice: Undefined variable: a in %s on line %d
|
|
NULL
|
|
Done
|