3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $secret = 9292929; $data = '<?php $secret = 1111111; ?>'; $trigger = ".*)/e\0"; preg_replace( "/($trigger)/i", '<em> . strtoupper($1) . </em>', $data ); var_dump( $secret );
Output for 5.4.7 - 5.6.28, 7.0.0 - 7.1.0
Warning: preg_replace(): Null byte in regex in /in/FiWm5 on line 9 int(9292929)
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Error: Null byte found in pattern in /in/FiWm5 on line 9
Process exited with code 255.
Output for 5.2.3 - 5.4.6
Parse error: syntax error, unexpected '<' in /in/FiWm5(9) : regexp code on line 1 Fatal error: preg_replace(): Failed evaluating code: <em> . strtoupper(<?php $secret = 1111111; ?>) . </em> in /in/FiWm5 on line 9
Process exited with code 255.
Output for 5.1.2 - 5.2.2
<br /> <b>Parse error</b>: syntax error, unexpected '<' in <b>/in/FiWm5(9) : 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: &amp;lt;em&amp;gt; . strtoupper(&amp;lt;?php $secret = 1111111; ?&amp;gt;) . &amp;lt;/em&amp;gt; in <b>/in/FiWm5</b> on line <b>9</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/FiWm5(9) : 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: &lt;em&gt; . strtoupper(&lt;?php $secret = 1111111; ?&gt;) . &lt;/em&gt; in <b>/in/FiWm5</b> on line <b>9</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/FiWm5(9) : 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: &lt;em&gt; . strtoupper(&lt;?php $secret = 1111111; ?&gt;) . &lt;/em&gt; in <b>/in/FiWm5</b> on line <b>9</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/FiWm5(9) : 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: &amp;lt;em&amp;gt; . strtoupper(&amp;lt;?php $secret = 1111111; ?&amp;gt;) . &amp;lt;/em&amp;gt; in <b>/in/FiWm5</b> on line <b>9</b><br />
Process exited with code 255.
Output for 4.4.2
<br /> <b>Parse error</b>: syntax error, unexpected '<' in <b>/in/FiWm5(9) : regexp code</b> on line <b>1</b><br /> <br /> <b>Fatal error</b>: preg_replace(): Failed evaluating code: &amp;lt;em&amp;gt; . strtoupper(&amp;lt;?php $secret = 1111111; ?&amp;gt;) . &amp;lt;/em&amp;gt; in <b>/in/FiWm5</b> on line <b>9</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/FiWm5(9) : regexp code</b> on line <b>1</b><br /> <br /> <b>Fatal error</b>: preg_replace(): Failed evaluating code: &lt;em&gt; . strtoupper(&lt;?php $secret = 1111111; ?&gt;) . &lt;/em&gt; in <b>/in/FiWm5</b> on line <b>9</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/FiWm5(9) : regexp code</b> on line <b>1</b><br /> <br /> <b>Fatal error</b>: Failed evaluating code: <em> . strtoupper(<?php $secret = 1111111; ?>) . </em> in <b>/in/FiWm5</b> on line <b>9</b><br />
Process exited with code 255.
Output for 4.3.4
<br /> <b>Parse error</b>: parse error in <b>/in/FiWm5(9) : regexp code</b> on line <b>1</b><br /> <br /> <b>Fatal error</b>: Failed evaluating code: <em> . strtoupper(<?php $secret = 1111111; ?>) . </em> in <b>/in/FiWm5</b> on line <b>9</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/FiWm5(9) : 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/FiWm5(9) : regexp code</b> on line <b>1</b><br />
Process exited with code 139.