3v4l.org

run code in 300+ PHP versions simultaneously
<?php function compileEchoes($value){ $value = preg_replace ('/\{\{\{\s*(.+?)\s*\}\}\}/s', '<?php echo $1; ?>', $value); return preg_replace ('/\{\{\s*(.+?)\s*\}\}/s', "<?php echo htmlentities($1, ENT_QUOTES, 'UTF-8', false); ?>", $value); } $that = compileEchoes('{{<strong>Is this bold?</strong>}}'); echo $that; echo htmlentities(<strong>Is this bold?</strong>, ENT_QUOTES, 'UTF-8', false); ?>
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '<', expecting ')' in /in/JiLUP on line 9
Process exited with code 255.

preferences:
185.47 ms | 1395 KiB | 65 Q