3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $words["test"] = "foooo"; echo preg_replace( "/<#(.+?)#>/e", "\$words[\\1]", "test <#test].phpinfo()#>" );
Output for 7.0.0 - 7.1.0
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /in/mkYUl on line 5
Output for 5.5.0 - 5.6.28
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /in/mkYUl on line 5 Parse error: syntax error, unexpected ']' in /in/mkYUl(5) : regexp code on line 1 Fatal error: preg_replace(): Failed evaluating code: $words[test].phpinfo()] in /in/mkYUl on line 5
Process exited with code 255.
Output for 5.2.3 - 5.4.45
Parse error: syntax error, unexpected ']' in /in/mkYUl(5) : regexp code on line 1 Fatal error: preg_replace(): Failed evaluating code: $words[test].phpinfo()] in /in/mkYUl on line 5
Process exited with code 255.
Output for 5.1.2 - 5.2.2
<br /> <b>Parse error</b>: syntax error, unexpected ']' in <b>/in/mkYUl(5) : regexp code</b> on line <b>1</b><br /> <br /> <b>Fatal error</b>: preg_replace() [&lt;a href='function.preg-replace'&gt;function.preg-replace&lt;/a&gt;]: Failed evaluating code: $words[test].phpinfo()] in <b>/in/mkYUl</b> on line <b>5</b><br />
Process exited with code 255.
Output for 5.1.0 - 5.1.1
<br /> <b>Parse error</b>: syntax error, unexpected ']' in <b>/in/mkYUl(5) : regexp code</b> on line <b>1</b><br /> <br /> <b>Fatal error</b>: preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Failed evaluating code: $words[test].phpinfo()] in <b>/in/mkYUl</b> on line <b>5</b><br />
Process exited with code 255.
Output for 5.0.0 - 5.0.5
<br /> <b>Parse error</b>: parse error, unexpected ']' in <b>/in/mkYUl(5) : regexp code</b> on line <b>1</b><br /> <br /> <b>Fatal error</b>: preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Failed evaluating code: $words[test].phpinfo()] in <b>/in/mkYUl</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.4.3 - 4.4.9
<br /> <b>Parse error</b>: syntax error, unexpected ']' in <b>/in/mkYUl(5) : regexp code</b> on line <b>1</b><br /> <br /> <b>Fatal error</b>: preg_replace() [&lt;a href='function.preg-replace'&gt;function.preg-replace&lt;/a&gt;]: Failed evaluating code: $words[test].phpinfo()] in <b>/in/mkYUl</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.4.2
<br /> <b>Parse error</b>: syntax error, unexpected ']' in <b>/in/mkYUl(5) : regexp code</b> on line <b>1</b><br /> <br /> <b>Fatal error</b>: preg_replace(): Failed evaluating code: $words[test].phpinfo()] in <b>/in/mkYUl</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.3.11 - 4.4.1
<br /> <b>Parse error</b>: parse error, unexpected ']' in <b>/in/mkYUl(5) : regexp code</b> on line <b>1</b><br /> <br /> <b>Fatal error</b>: preg_replace(): Failed evaluating code: $words[test].phpinfo()] in <b>/in/mkYUl</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.3.5 - 4.3.10
<br /> <b>Parse error</b>: parse error, unexpected ']' in <b>/in/mkYUl(5) : regexp code</b> on line <b>1</b><br /> <br /> <b>Fatal error</b>: Failed evaluating code: $words[test].phpinfo()] in <b>/in/mkYUl</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.3.4
<br /> <b>Parse error</b>: parse error in <b>/in/mkYUl(5) : regexp code</b> on line <b>1</b><br /> <br /> <b>Fatal error</b>: Failed evaluating code: $words[test].phpinfo()] in <b>/in/mkYUl</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.3
<br /> <b>Parse error</b>: parse error in <b>/in/mkYUl(5) : regexp code</b> on line <b>1</b><br />
Process exited with code 139.
Output for 4.3.0 - 4.3.1
<br /> <b>Parse error</b>: parse error, unexpected ']' in <b>/in/mkYUl(5) : regexp code</b> on line <b>1</b><br />
Process exited with code 139.