3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"options": {"options0": {"name":"soph","value":"School of Public Health"}, "options1": {"name":"son","value":"School of Nursing"}, "options2": {"name":"sohp","value":"School of Health Professions"} } }'; $arr = array_column(json_decode($json, true)['options'], "value", "name"); var_dump($arr); echo $arr['sohp'];
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { ["soph"]=> string(23) "School of Public Health" ["son"]=> string(17) "School of Nursing" ["sohp"]=> string(28) "School of Health Professions" } School of Health Professions

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