1--TEST--
2Test stripos() function : basic functionality - with default arguments
3--FILE--
4<?php
5echo "*** Testing stripos() function: basic functionality ***\n";
6$heredoc_str = <<<Identifier
7Hello, World
8Identifier;
9
10echo "-- With default arguments --\n";
11//regular string for haystack & needle
12var_dump( stripos("Hello, World", "Hello") );
13var_dump( stripos('Hello, World', "hello") );
14var_dump( stripos("Hello, World", 'World') );
15var_dump( stripos('Hello, World', 'WORLD') );
16
17//single char for needle
18var_dump( stripos("Hello, World", "o") );
19var_dump( stripos("Hello, World", ",") );
20
21//heredoc string for haystack & needle
22var_dump( stripos($heredoc_str, "Hello, World") );
23var_dump( stripos($heredoc_str, 'Hello') );
24var_dump( stripos($heredoc_str, $heredoc_str) );
25
26//non-existing needle in haystack
27var_dump( stripos("Hello, World", "ooo") );
28echo "*** Done ***";
29?>
30--EXPECT--
31*** Testing stripos() function: basic functionality ***
32-- With default arguments --
33int(0)
34int(0)
35int(7)
36int(7)
37int(4)
38int(5)
39int(0)
40int(0)
41int(0)
42bool(false)
43*** Done ***
44