3v4l.org

run code in 300+ PHP versions simultaneously
<?php $prefix = 'pre_'; $clients = [ (object) ['user_login' => 'foo'], (object) ['user_login' => 'bar'], (object) ['user_login' => 'buzz'], ]; $result = [ 'label' => 'Assign to user', 'desc' => 'Choose a user', 'id' => $prefix . 'client', 'type' => 'radio', 'options' => array_map( fn($user) => [ 'label' => $user->user_login, 'value' => $user->user_login, ], $clients ) ]; var_export($result);
Output for git.master_jit, git.master, rfc.property-hooks
array ( 'label' => 'Assign to user', 'desc' => 'Choose a user', 'id' => 'pre_client', 'type' => 'radio', 'options' => array ( 0 => array ( 'label' => 'foo', 'value' => 'foo', ), 1 => array ( 'label' => 'bar', 'value' => 'bar', ), 2 => array ( 'label' => 'buzz', 'value' => 'buzz', ), ), )

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