3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = unserialize('a:3:{i:0;a:2:{s:8:"frage_id";s:1:"3";s:7:"antwort";s:1:"3";}i:1;a:2:{s:8:"frage_id";s:1:"4";s:7:"antwort";s:1:"3";}i:2;a:2:{s:8:"frage_id";s:1:"5";s:7:"antwort";s:1:"3";}}'); $keys = array_column($array, "frage_id"); $values = array_column($array, "antwort"); $prepend_func = function($value) { return "s" . $value; }; $keys = array_map($prepend_func, $keys); $combined = array_combine($keys, $values); print_r($combined);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [s3] => 3 [s4] => 3 [s5] => 3 )

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:
48.14 ms | 401 KiB | 8 Q