1--TEST--
2Test strrpos() function : usage variations - empty heredoc string for 'haystack' argument
3--FILE--
4<?php
5/* Prototype  : int strrpos ( string $haystack, string $needle [, int $offset] );
6 * Description: Find position of last occurrence of 'needle' in 'haystack'.
7 * Source code: ext/standard/string.c
8*/
9
10/* Test strrpos() function by passing empty heredoc string for haystack
11 *  and with various needles & offsets
12*/
13
14echo "*** Testing strrpos() function: with heredoc strings ***\n";
15echo "-- With empty heredoc string --\n";
16$empty_string = <<<EOD
17EOD;
18var_dump( strrpos($empty_string, "") );
19var_dump( strrpos($empty_string, "", 1) );
20var_dump( strrpos($empty_string, FALSE) );
21var_dump( strrpos($empty_string, NULL) );
22
23echo "*** Done ***";
24?>
25--EXPECTF--
26*** Testing strrpos() function: with heredoc strings ***
27-- With empty heredoc string --
28bool(false)
29bool(false)
30bool(false)
31bool(false)
32*** Done ***
33