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