O'Reilly logo

Programming PHP, 3rd Edition by Peter MacIntyre, Kevin Tatroe, Rasmus Lerdorf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

substr_compare

Synopsis

int substr_compare(string first, string second, string
   offset[, int length[, bool case_insensitivity]])

Compares first, starting at the position offset, to second. If length is specified, a maximum of that many characters are compared. Finally, if case_insensitivity is specified and true, the comparison is case-insensitive. Returns a number less than 0 if the substring of first is less than second, 0 if they are equal, and a number greater than 0 if the substring of first is greater than second.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required