3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = '{IF bla}Text 1{ELSEIF ble}Text 2 {IF bli}Text 2.1{ELSE blo}Text 2.1{ENDIF} Main text end{/ENDIF}'; var_dump(preg_match('#\{IF .*\}.*\{ENDIF\}#is',$string,$m)); var_dump($m);
based on JslZB
Output for 5.6.0 - 5.6.30, hhvm-3.18.4 - 3.21.0, 7.0.0 - 7.3.0beta1
int(1) array(1) { [0]=> string(74) "{IF bla}Text 1{ELSEIF ble}Text 2 {IF bli}Text 2.1{ELSE blo}Text 2.1{ENDIF}" }