I'm trying to do this in Object Oriented PHP, but I have an issue when recursion is used (if the first string starts with a "(", I want to check the following char), the other cases work. Here is the code:
public static function different_first($item,$item1) {
if (substr($item, 0, 1) != substr($item1, 0, 1)) {
return TRUE;
} else if (substr($item,0,1)=="(") {
Object::different_first(substr($item, 1), $item1);
} else {
return FALSE;
}
}