3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mailObfuscate($mail) { //every second character replace with * $mail = explode('@',$mail); $array = str_split($mail[0]); $control = 0; $ret = ''; foreach ($array as $char) { if ($control == 0) { $ret .= '*'; } else { $ret .= $char; } $control = !$control; } return $ret.'@'.$mail[1]; } echo mailObfuscate("realname_x123@gmail.com");
Output for git.master, git.master_jit, rfc.property-hooks
*e*l*a*e*x*2*@gmail.com

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