1--TEST--
2Test strcspn() function : basic functionality
3--FILE--
4<?php
5/*
6* Testing strcspn() : basic functionality
7*/
8
9echo "*** Testing strcspn() : basic functionality ***\n";
10
11
12// Initialise all required variables
13$str = "this is the test string";
14$mask = "es";
15$start = 15;
16$len = 3;
17
18// Calling strcspn() with all possible arguments
19var_dump( strcspn($str, $mask, $start, $len) );
20
21// Calling strcspn() with three arguments
22var_dump( strcspn($str, $mask, $start) );
23
24// Calling strcspn() with default arguments
25var_dump( strcspn($str, $mask) );
26
27echo "Done"
28?>
29--EXPECT--
30*** Testing strcspn() : basic functionality ***
31int(2)
32int(2)
33int(3)
34Done
35