3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $text = "prova %[STATIC-COMPAGNIA-NOME]%"; $text = preg_replace('/\{([^\} ]+)\}/ime', '%[$1]%', $text); echo "TESTO" . $text;
based on cafAc
Output for 7.0.0 - 7.2.0
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /in/Df10u on line 4 TESTO
Output for 5.4.0 - 5.4.45, hhvm-3.10.1 - 3.11.1, hhvm-3.17.3
TESTOprova %[STATIC-COMPAGNIA-NOME]%
Output for hhvm-3.12.14 - 3.15.4

Process exited with code 137.
Output for 5.5.0 - 5.6.30
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /in/Df10u on line 4 TESTOprova %[STATIC-COMPAGNIA-NOME]%