3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = '${first_name}, ${last_name}, ${create_date:(Y-m-d)}, ${submit_date:(Y-m-d)}'; var_export(preg_match_all('~\$\{([^:}]+)(?::([^}]+))?~', $string, $out, PREG_SET_ORDER) ? $out : 'fail');

preferences:
101 ms | 1469 KiB | 5 Q