3v4l.org

run code in 300+ PHP versions simultaneously
<?php $template = "select emp.* from employee emp" . " join departments dep on emp.id_department = dep.id" . " @{where}" . " @{order}" . " limit :limit offset :offset"; echo $template; $pattern = '/[^\\$]\\@\\{(\\w+)\\}/'; preg_match_all($pattern, $template, $matches); var_dump($matches);

preferences:
59.24 ms | 402 KiB | 5 Q