3v4l.org

run code in 300+ PHP versions simultaneously
<?php $temp = [ 0 => (object) [ "id" => "561", "lot_no" => "1", "weight" => "16230", "staple" => "3600", "mic" => "0", "strength" => "0", "trash" => "0", "color_grade" => "0", ], 1 => (object) [ "id" => "562", "lot_no" => "2", "weight" => "15523", "staple" => "3600", "mic" => "0", "strength" => "0", "trash" => "0", "color_grade" => "0", ], ]; $temp = array_column($temp, null, "id"); print_r($temp);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [561] => stdClass Object ( [id] => 561 [lot_no] => 1 [weight] => 16230 [staple] => 3600 [mic] => 0 [strength] => 0 [trash] => 0 [color_grade] => 0 ) [562] => stdClass Object ( [id] => 562 [lot_no] => 2 [weight] => 15523 [staple] => 3600 [mic] => 0 [strength] => 0 [trash] => 0 [color_grade] => 0 ) )

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:
29.42 ms | 407 KiB | 5 Q