1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00

Test case for strspn()/strcspn().

This commit is contained in:
Andrey Hristov
2002-09-25 19:08:38 +00:00
parent f80a817f7c
commit 7badd563cb
+26
View File
@@ -0,0 +1,26 @@
--TEST--
Test strspn() and strcspn() behavior
--POST--
--GET--
--FILE--
<?php
$a = "22222222aaaa bbb1111 cccc";
$b = "1234";
var_dump($a);
var_dump($b);
var_dump(strspn($a,$b));
var_dump(strcspn($a,$b));
var_dump(strspn($a,$b,2));
var_dump(strcspn($a,$b,9));
var_dump(strspn($a,$b,2,3));
var_dump(strcspn($a,$b,9,6));
?>
--EXPECT--
string(25) "22222222aaaa bbb1111 cccc"
string(4) "1234"
int(8)
int(0)
int(6)
int(7)
int(3)
int(6)