3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $html = "<h1>{${eval(\"1+2\")}}</h1>"; // uppercase headings $html = preg_replace( '(<h([1-6])>(.*?)</h\1>)e', '"<h$1>" . strtoupper("$2") . "</h$1>"', $html );
Output for 5.4.0 - 5.4.12
Parse error: syntax error, unexpected '"1+2\")}}</h1>"' (T_CONSTANT_ENCAPSED_STRING), expecting identifier (T_STRING) in /in/npdTR on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.22
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING in /in/npdTR on line 2
Process exited with code 255.