3v4l.org

run code in 300+ PHP versions simultaneously
<?php function authorform_form_alter_custom_sort($a,$b){ $orderPL = array('A','Ą','B','C','Ć','D','E','Ę','F','G','H','I','J','K','L','Ł','M','N','Ń','O','Ó','P','Q','R','S','Ś','T','U','V','W','X','Y','Z','Ź','Ż', 'a','ą','b','c','ć','d','e','ę','f','g','h','i','j','k','l','ł','m','n','ń','o','ó','p','q','r','s','ś','t','u','v','w','x','y','z','ź','ż'); if ($a == $b) { return 0; } if (mb_substr($a, 0, 1, 'utf-8') == mb_substr($b, 0, 1, 'utf-8')) { return authorform_form_alter_custom_sort(substr($a, 1),substr($b, 1)); } return (array_search($a, $orderPL) < array_search($b, $orderPL)) ? -1 : 1; } echo authorform_form_alter_custom_sort("Polko","Pietraśko");
Output for git.master, git.master_jit, rfc.property-hooks
1

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
42.48 ms | 401 KiB | 8 Q