3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('1.txt', '20.txt', '2.txt', '21.txt'); natsort($array); // Array ist nun wie gewünscht in natürlicher Reihenfolge sortiert.

preferences:
69.45 ms | 402 KiB | 5 Q