3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = "Hello this is {name} and I like to {verb} my {noun}{punctuation}"; var_dump(preg_match_all("/{\w+}/", $str, $matches), $matches);
Output for 5.3.6 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
int(4) array(1) { [0]=> array(4) { [0]=> string(6) "{name}" [1]=> string(6) "{verb}" [2]=> string(6) "{noun}" [3]=> string(13) "{punctuation}" } }