3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hash = '4dff4ea340f0a823f15d3f4f01ab62eae05da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a'; //^ Indica o inicio do texto //(.{n}) Captura os próximos n caracteres. //(.+)$ Captura os caracteres restantes até o final do texto. $pattern = '/^(.{8})(.{4})(.{4})(.{4})(.+)$/'; // $n.. representa cada um dos grupos entre parenteses, onde n indica a posição do grupo no $pattern. $replacement = '$1-$2-$3-$4-$5'; $masked = preg_replace($pattern, $replacement, $hash); echo $masked;
Output for git.master, git.master_jit, rfc.property-hooks
4dff4ea3-40f0-a823-f15d-3f4f01ab62eae05da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a

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