3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function spam($email) { $email = 'aaa@eqreqrq.sgwgfwr'; $email = preg_replace("/\./", " dot ", $email); $email = preg_replace("/@/", " AT ", $email); return $email; } function markup($filename, $use_me) { $contents = '$email'; $contents = preg_replace("/(\[email (.*)\])/e", "spam(\"\\2\")", $contents); $contents = preg_replace("/\[/", "<", $contents); $contents = preg_replace("/\]/", ">", $contents); return $contents; } $output = markup($argv[1], $argv[2]); $output2 = spam($argv[1]); print $output2; print $output;
Output for 7.0.0 - 7.1.0
Notice: Undefined offset: 1 in /in/tSP55 on line 24 Notice: Undefined offset: 2 in /in/tSP55 on line 24 Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /in/tSP55 on line 17 Notice: Undefined offset: 1 in /in/tSP55 on line 26 aaa AT eqreqrq dot sgwgfwr
Output for hhvm-3.10.0 - 3.13.2
Notice: Undefined index: 1 in /in/tSP55 on line 24 Notice: Undefined index: 2 in /in/tSP55 on line 24 Notice: Undefined index: 1 in /in/tSP55 on line 26 aaa AT eqreqrq dot sgwgfwr$email
Output for 5.5.0 - 5.6.28
Notice: Undefined offset: 1 in /in/tSP55 on line 24 Notice: Undefined offset: 2 in /in/tSP55 on line 24 Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /in/tSP55 on line 17 Notice: Undefined offset: 1 in /in/tSP55 on line 26 aaa AT eqreqrq dot sgwgfwr$email
Output for 5.3.0 - 5.4.45
Notice: Undefined offset: 1 in /in/tSP55 on line 24 Notice: Undefined offset: 2 in /in/tSP55 on line 24 Notice: Undefined offset: 1 in /in/tSP55 on line 26 aaa AT eqreqrq dot sgwgfwr$email
Output for 4.3.2 - 5.2.17
Notice: Undefined offset: 1 in /in/tSP55 on line 24 Notice: Undefined offset: 2 in /in/tSP55 on line 24 Notice: Undefined offset: 1 in /in/tSP55 on line 26 aaa AT eqreqrq dot sgwgfwr$email
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: argv in /in/tSP55 on line 24 Notice: Undefined variable: argv in /in/tSP55 on line 24 Notice: Undefined variable: argv in /in/tSP55 on line 26 aaa AT eqreqrq dot sgwgfwr$email