3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = array_map(function($v) { return ['key' => trim($v)]; }, explode(',', 'first_group, second_group, third_group')); print_r($result);
based on f5IDk

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch master
Array ( [0] => Array ( [key] => first_group ) [1] => Array ( [key] => second_group ) [2] => Array ( [key] => third_group ) )

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