3v4l.org

run code in 300+ PHP versions simultaneously
<?php function createStringFromMap($map) { $chars = array('C*'); end($map); $last = key($map); for ($i = $j = $char = 0; $i <= $last; $i++) { $bit = isset($map[$i]) ? $map[$i] : 0; $char |= ($bit << (7 - $j)); if (++$j === 8) { $chars[] = $char; $j = $char = 0; } } if ($char) { $chars[] = $char; } return call_user_func_array('pack', $chars); } $map = array(); $map[1] = 1; $map[9] = 1; $map[17] = 1; $map[25] = 1; echo createStringFromMap($map);
Output for git.master, git.master_jit, rfc.property-hooks
@@@@

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