3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hs_mailreplace($str) { return preg_replace_callback ('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})^', create_function ( '$str', 'for ($i = 0; $i < strlen($str[0]); $i++) { $result .= "&#" . ord(substr($str[0], $i, 1)) . ";"; }; return $result;' ), $str); } echo hs_mailreplace("tesasdasdasdt@test.com")."\n";
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function create_function() in /in/BHQv0:5 Stack trace: #0 /in/BHQv0(14): hs_mailreplace('tesasdasdasdt@t...') #1 {main} thrown in /in/BHQv0 on line 5
Process exited with code 255.

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