3v4l.org

run code in 300+ PHP versions simultaneously
<?php $post = array( "name" => "John", "user" => "1" , "title" => "hello" , "uploader_0_name" => "pic.jpg", "uploader_0_status" => "done", "uploader_1_name" => "aaaa.jpg", "uploader_1_status" => "done", "uploader_2_name" => "Tulips.jpg", "uploader_2_status" => "failed", "uploader_count" => "3" ); foreach ($post as $key => $value) { if (preg_match('/^[a-z]+_(\d)_([a-z]+)$/', $key, $matches)) { $result[$matches[1]][$matches[2]] = $value; } } print_r($result);

preferences:
31.71 ms | 402 KiB | 5 Q