Iterate over the strings and check if a character in first string is also present in second string , return true
for ( $ i = 0 ; $ i < strlen ( $ s1 ) ; $ i ++ ) for ( $ j = 0 ; $ j < strlen ( $ s2 ) ; $ j ++ ) if ( $ s1 [ $ i ] == $ s2 [ $ j ] ) return true ;