summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/strripos.phpt
blob: fa15e2fcacae7fc83ecc3ae09d5247b86a30c5f7 (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
--TEST--
strripos() function
--FILE--
<?php
	var_dump(strripos("test test string", "test"));
	var_dump(strripos("test string sTring", "string"));
	var_dump(strripos("test strip string strand", "str"));
	var_dump(strripos("I am what I am and that's all what I am", "am", -3));
	var_dump(strripos("test string", "g"));
	var_dump(strripos("te".chr(0)."st", chr(0)));
	var_dump(strripos("tEst", "test"));
	var_dump(strripos("teSt", "test"));
	var_dump(@strripos("foo", "f", 1));
	var_dump(@strripos("", ""));
	var_dump(@strripos("a", ""));
	var_dump(@strripos("", "a"));
	var_dump(@strripos("\\\\a", "\\a"));
?>
--EXPECT--
int(5)
int(12)
int(18)
int(12)
int(10)
int(2)
int(0)
int(0)
bool(false)
bool(false)
bool(false)
bool(false)
int(1)