3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdClass(); $a->meta_data = array(); $a->meta_data[0] = new stdClass(); $a->meta_data[0]->id = "2113"; $a->meta_data[0]->key = "First Name"; $a->meta_data[0]->value = "Recipient First Name"; $a->meta_data[1] = new stdClass(); $a->meta_data[1]->id = "2114"; $a->meta_data[1]->key = "Last Name"; $a->meta_data[1]->value = "Recipient Last Name"; $a->meta_data[2] = new stdClass(); $a->meta_data[2]->id = "2115"; $a->meta_data[2]->key = "addressLine 1"; $a->meta_data[2]->value = "Recipient Address Line 1"; $a->meta_data[3] = new stdClass(); $a->meta_data[3]->id = "2116"; $a->meta_data[3]->key = "addressLine2"; $a->meta_data[3]->value = "Recipient Address Line 2"; $a->meta_data[4] = new stdClass(); $a->meta_data[4]->id = "2117"; $a->meta_data[4]->key = "City"; $a->meta_data[4]->value = "Recipient Town/City"; $a->meta_data[5] = new stdClass(); $a->meta_data[5]->id = "2118"; $a->meta_data[5]->key = "Region"; $a->meta_data[5]->value = "Recipient Region/County"; $a->meta_data[6] = new stdClass(); $a->meta_data[6]->id = "2119"; $a->meta_data[6]->key = "Country"; $a->meta_data[6]->value = "N/A"; $a->meta_data[7] = new stdClass(); $a->meta_data[7]->id = "2120"; $a->meta_data[7]->key = "Postcode"; $a->meta_data[7]->value = "Recipient Postcode"; $item_values = json_encode($a); $item_data_decode = json_decode($item_values, true); $meta_array = array_combine(array_column($item_data_decode['meta_data'], 'key'), $item_data_decode['meta_data']); var_dump($meta_array); if (!empty($meta_array['First Name'])) { $fName = $meta_array['First Name']['value']; } var_dump($fName);
Output for git.master, git.master_jit, rfc.property-hooks
array(8) { ["First Name"]=> array(3) { ["id"]=> string(4) "2113" ["key"]=> string(10) "First Name" ["value"]=> string(20) "Recipient First Name" } ["Last Name"]=> array(3) { ["id"]=> string(4) "2114" ["key"]=> string(9) "Last Name" ["value"]=> string(19) "Recipient Last Name" } ["addressLine 1"]=> array(3) { ["id"]=> string(4) "2115" ["key"]=> string(13) "addressLine 1" ["value"]=> string(24) "Recipient Address Line 1" } ["addressLine2"]=> array(3) { ["id"]=> string(4) "2116" ["key"]=> string(12) "addressLine2" ["value"]=> string(24) "Recipient Address Line 2" } ["City"]=> array(3) { ["id"]=> string(4) "2117" ["key"]=> string(4) "City" ["value"]=> string(19) "Recipient Town/City" } ["Region"]=> array(3) { ["id"]=> string(4) "2118" ["key"]=> string(6) "Region" ["value"]=> string(23) "Recipient Region/County" } ["Country"]=> array(3) { ["id"]=> string(4) "2119" ["key"]=> string(7) "Country" ["value"]=> string(3) "N/A" } ["Postcode"]=> array(3) { ["id"]=> string(4) "2120" ["key"]=> string(8) "Postcode" ["value"]=> string(18) "Recipient Postcode" } } string(20) "Recipient First Name"

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:
147.11 ms | 409 KiB | 5 Q