3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "This is a short sentence which should include all regex results"; echo preg_replace(array('/\b(\w{1,3})\b/', '/\b(\w{4,})\b/'), array('$1*', '+$1*'), $string);

preferences:
24.19 ms | 404 KiB | 5 Q