3v4l.org

run code in 300+ PHP versions simultaneously
<?php $groups="group1, group2, group3,,foo"; $functions="member, member, admin,,bar"; $keys = preg_split('(\s*,+\s*)', $groups); $values = preg_split('(\s*,+\s*)', $functions); $array = array_combine($keys, $values); var_dump($array);

preferences:
32.4 ms | 406 KiB | 6 Q