3v4l.org

run code in 300+ PHP versions simultaneously
<?php $unparsed_disks = [ ["sender_id"=> '123', "sender_email" => 'john.doe@gmail.com', "receiver_id" => '789', "receiver_email" => 'jane.doe@gmail.com', "file_name" => 'form.txt', "s3_dir_name" => 'FileDrop1626801'], ["sender_id"=> '123', "sender_email" => 'john.doe@gmail.com', "receiver_id" => '405', "receiver_email" => 'john.smith@gmail.com', "file_name" => 'form.txt', "s3_dir_name" => 'FileDrop1626809'], ["sender_id"=> '123', "sender_email" => 'john.doe@gmail.com', "receiver_id" => '789', "receiver_email" => 'jane.doe@gmail.com', "file_name" => 'form.txt', "s3_dir_name" => 'FileDrop1626809'], ]; $parsed_disks = []; foreach ($unparsed_disks as $value) { if (array_key_exists('s3_dir_name', $value)) { $parsed_disks[$value['s3_dir_name']][] = $value; } else { $parsed_disks['UnkownDisk'][] = $value; } } // var_export($parsed_disks); foreach ($parsed_disks as $disk => $transactions) { printf("Current Disk: %s\n", $disk); foreach ($transactions as $transaction) { printf("\tSent from: %s, To: %s\n", $transaction['sender_email'], $transaction['receiver_email']); } }
Output for git.master, git.master_jit, rfc.property-hooks
Current Disk: FileDrop1626801 Sent from: john.doe@gmail.com, To: jane.doe@gmail.com Current Disk: FileDrop1626809 Sent from: john.doe@gmail.com, To: john.smith@gmail.com Sent from: john.doe@gmail.com, To: jane.doe@gmail.com

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:
171.39 ms | 406 KiB | 5 Q