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