longestCommonSubstring

Returns the longest common substring between the string and $otherStr.

Description

static longestCommonSubstring(string $otherStr)

In the case of ties, it returns that which occurs first.

Parameters

  • string $otherStr
    Second string for comparison

Return Value

static
String being the longest common substring