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