File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
standard /
tests /
strings /
stripos.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:04 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--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";
?>
--EXPECT--
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)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
int(1)
Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>