File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
standard /
tests /
strings /
substr_count_basic.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--
Test substr_count() function (basic)
--FILE--
<?php
echo "***Testing basic operations ***\n";
var_dump(@substr_count("", ""));
var_dump(@substr_count("a", ""));
var_dump(@substr_count("", "a"));
var_dump(@substr_count("", "a"));
var_dump(@substr_count("", chr(0)));
$a = str_repeat("abcacba", 100);
var_dump(@substr_count($a, "bca"));
$a = str_repeat("abcacbabca", 100);
var_dump(@substr_count($a, "bca"));
var_dump(substr_count($a, "bca", 200));
var_dump(substr_count($a, "bca", 200, 50));
echo "Done\n";
?>
--EXPECTF--
***Testing basic operations ***
bool(false)
bool(false)
int(0)
int(0)
int(0)
int(100)
int(200)
int(160)
int(10)
Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>