private function index_of($haystack, $needle, $offset = 0) { $index = strpos($haystack, $needle, $offset); return $index !== FALSE ? $index : -1; }