summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/stripos.phpt
blob: 057b8ca494d79d84b9544ebea14325501000382c (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
--TEST--
stripos() function test
--FILE--
<?php
	var_dump(stripos("test string", "TEST"));
	var_dump(stripos("test string", "strIng"));
	var_dump(stripos("test string", "stRin"));
	var_dump(stripos("test string", "t S"));
	var_dump(stripos("test string", "G"));
	var_dump(stripos("te".chr(0)."st", chr(0)));
	var_dump(stripos("tEst", "test"));
	var_dump(stripos("teSt", "test"));
	var_dump(stripos("", ""));
	var_dump(stripos("a", ""));
	var_dump(stripos("", "a"));
	var_dump(stripos("a", " "));
	var_dump(stripos("a", "a"));
	var_dump(stripos("", 1));
	var_dump(stripos("", false));
	var_dump(stripos("", true));
	var_dump(stripos("a", 1));
	var_dump(stripos("a", false));
	var_dump(stripos("a", true));
	var_dump(stripos("1", 1));
	var_dump(stripos("0", false));
	var_dump(stripos("1", true));
	var_dump(stripos("\\\\a", "\\a"));

	echo "Done\n";
?>
--EXPECTF--
int(0)
int(5)
int(5)
int(3)
int(10)
int(2)
int(0)
int(0)
bool(false)
bool(false)
bool(false)
bool(false)
int(0)
bool(false)
bool(false)
bool(false)

Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)

Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)

Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)

Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)

Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)

Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in %s on line %d
bool(false)
int(1)
Done