3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fonts = array( 0 => ["index" => 0, "name" => "Arial", "path" => "assets/fonts/arial.ttf"], 1 => ["index" => 1, "name" => "Times", "path" => "assets/fonts/times.ttf"], 2 => ["index" => 2, "name" => "Roboto", "path" => "assets/fonts/roboto.ttf"], 3 => ["index" => 3, "name" => "AlexBrush", "path" => "assets/fonts/AlexBrush-Regular.ttf"], ); uasort($fonts, function($a, $b) { return strcmp($a['name'], $b['name']); }); $indexed_array = array_column($fonts,'name','index'); // array column map name by index print_r($indexed_array); echo $indexed_array[3]; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [3] => AlexBrush [0] => Arial [2] => Roboto [1] => Times ) AlexBrush

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:
176.95 ms | 405 KiB | 5 Q