strnatcmp

PHP 4, PHP 5, PHP 7, PHP 8
strnatcmp - String comparisons using a "natural order" algorithm

Example #1

Result: Standard string comparison Array ( [0] => img1.png [1] => img10.png [2] => img12.png [3] => img2.png ) Natural order string comparison Array ( [0] => img1.png [1] => img2.png [2] => img10.png [3] => img12.png )
PHP Version:


Example #2 of strnatcmp

PHP Version:


Function strnatcmp:

Strings Functions

Most used PHP functions