<?php
$sortOrder = array("bms", "dr", "fds", "pcm", "fr"); (
(
0 => '123456_bms_for__on__(10-06-2015_18-57).pdf'
),
(
'123456_fr_on_09-21-2015_(09-22-2015_11-46).pdf'
),
(
'123456_pcm_for_vignesh_on__(10-12-2015_12-30).pdf'
),
(
'123456_fds_ext_for__on__(08-25-2015_10-23).pdf'
),
(
'123456_dr_for__on___(10-23-2015_13-06).pdf'
)
);
uksort($arr, function($a, $b) use ($sortOrder) { });
PD9waHAKCiRzb3J0T3JkZXIgPSBhcnJheSgiYm1zIiwgImRyIiwgImZkcyIsICJwY20iLCAiZnIiKTsKJGFyciA9IGFycmF5CigKICAgICdibXMnID0+IGFycmF5CiAgICAgICAgKAogICAgICAgICAgICAwID0+ICcxMjM0NTZfYm1zX2Zvcl9fb25fXygxMC0wNi0yMDE1XzE4LTU3KS5wZGYnCiAgICAgICAgKSwKCiAgICAnZnInID0+IGFycmF5CiAgICAgICAgKAogICAgICAgICAgICcxMjM0NTZfZnJfb25fMDktMjEtMjAxNV8oMDktMjItMjAxNV8xMS00NikucGRmJwogICAgICAgICksCgogICAgJ3BjbScgPT4gYXJyYXkKICAgICAgICAoCiAgICAgICAgICAgICcxMjM0NTZfcGNtX2Zvcl92aWduZXNoX29uX18oMTAtMTItMjAxNV8xMi0zMCkucGRmJwogICAgICAgICksCgogICAgJ2ZkcycgPT4gYXJyYXkKICAgICAgICAoCiAgICAgICAgICAgICcxMjM0NTZfZmRzX2V4dF9mb3JfX29uX18oMDgtMjUtMjAxNV8xMC0yMykucGRmJwogICAgICAgICksCgogICAgJ2RyJyA9PiBhcnJheQogICAgICAgICgKICAgICAgICAgICAgJzEyMzQ1Nl9kcl9mb3JfX29uX19fKDEwLTIzLTIwMTVfMTMtMDYpLnBkZicKICAgICAgICApCgopOwoKdWtzb3J0KCRhcnIsIGZ1bmN0aW9uKCRhLCAkYikgdXNlICgkc29ydE9yZGVyKSB7CglyZXR1cm4gYXJyYXlfc2VhcmNoKCRhLCAkc29ydE9yZGVyKSAtIGFycmF5X3NlYXJjaCgkYiwgJHNvcnRPcmRlcik7IAp9KTsKcHJpbnRfcigkYXJyKTs=