lastIndexOf() публичный Метод

Example:: String.lastIndexOf("Developers Developers Developers!", "Developers") == 22
public lastIndexOf ( string $string, string $search, integer $toIndex = null ) : integer
$string string The input string
$search string The substring to search for
$toIndex integer The position where the backwards search should start, defaults to the end
Результат integer The last index of the substring (>=0) or -1 if the substring was not found
 /**
  * @test
  * @dataProvider lastIndexOfExamples
  */
 public function lastIndexOfWorks($string, $search, $fromIndex, $expected)
 {
     $helper = new StringHelper();
     $result = $helper->lastIndexOf($string, $search, $fromIndex);
     $this->assertSame($expected, $result);
 }