strnatcmp()

It compares two strings using a “natural” algorithm.

Example

<?php
echo strnatcmp(“PHPCode”,”PHPCodez”);
?>

Output

-1

Share