1--TEST--
2Test strpbrk() function : basic functionality
3--FILE--
4<?php
5/* Prototype  : array strpbrk(string haystack, string char_list)
6 * Description: Search a string for any of a set of characters
7 * Source code: ext/standard/string.c
8 * Alias to functions:
9 */
10
11echo "*** Testing strpbrk() : basic functionality ***\n";
12
13// Initialise all required variables
14$text = 'This is a Simple text.';
15var_dump( strpbrk($text, 'mi') );
16var_dump( strpbrk($text, 'ZS') );
17var_dump( strpbrk($text, 'Z') );
18var_dump( strpbrk($text, 'H') );
19
20$text = '';
21var_dump( strpbrk($text, 'foo') );
22
23$text = "  aaa aaaSLR";
24var_dump( strpbrk($text, '     ') );
25
26var_dump( strpbrk(5, 5) );
27var_dump( strpbrk(5, "5") );
28
29?>
30===DONE===
31--EXPECT--
32*** Testing strpbrk() : basic functionality ***
33string(20) "is is a Simple text."
34string(12) "Simple text."
35bool(false)
36bool(false)
37bool(false)
38string(12) "  aaa aaaSLR"
39string(1) "5"
40string(1) "5"
41===DONE===
42