3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('Birnen', 'Äpfel', 'über', 'Über', 'drüber', 'Österreich'); $coll = new Collator('de_DE'); $coll->setAttribute(Collator::NUMERIC_COLLATION, Collator::ON); $coll->setAttribute(Collator::CASE_FIRST, Collator::UPPER_FIRST); $coll->sort($a); print_r($a); ?>

preferences:
63.05 ms | 404 KiB | 5 Q