3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $files = array('header','detay','footer'); echo './cache/' . implode('', $files) . EXT; echo '<br>'; $_lang = array('a'=>'a harfi','b'=>'b harfi'); $c = 'Hello world {[a]} please'; $c = preg_replace_callback('/\{\[(.*?)\]\}/', function($m) use ($_lang) { return isset($_lang[trim($m[1])]) ? $_lang[trim($m[1])] : $m[1]; }, $c); echo $c;
based on svrH2
Output for 7.2.0
Warning: Use of undefined constant EXT - assumed 'EXT' (this will throw an Error in a future version of PHP) in /in/o8srZ on line 3 ./cache/headerdetayfooterEXT<br>Hello world a harfi please
Output for 5.3.20 - 7.1.10
Notice: Use of undefined constant EXT - assumed 'EXT' in /in/o8srZ on line 3 ./cache/headerdetayfooterEXT<br>Hello world a harfi please