3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'The value of the field ā€˜%sā€™ ' . 'must match the pattern ā€˜%sā€™.'; $field = 'field'; $pattern = '@^[a-z0-9_]+$@i'; echo sprintf($text, $field, $pattern);

preferences:
36.18 ms | 402 KiB | 5 Q