blob: a7b683d3b86816eceb3ca3a7c51ac7df0eb5bff3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
--TEST--
Test stristr() function : error conditions
--FILE--
<?php
/* Prototype: string stristr ( string $haystack , mixed $needle [, bool $before_needle ] )
Description: Case-insensitive strstr()
*/
echo "*** Testing stristr() : error conditions ***\n";
echo "\n-- Testing stristr() function with empty haystack --\n";
var_dump( stristr(NULL, "") );
echo "\n-- Testing stristr() function with empty needle --\n";
var_dump( stristr("Hello World", "") );
?>
===DONE===
--EXPECTF--
*** Testing stristr() : error conditions ***
-- Testing stristr() function with empty haystack --
Warning: stristr(): Empty needle in %s on line %d
bool(false)
-- Testing stristr() function with empty needle --
Warning: stristr(): Empty needle in %s on line %d
bool(false)
===DONE===
|