3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "this is sachinĂ¹s school of sachin"; $pattern = "sach"; if(preg_match("/\\b\\w*".$pattern."(\\w*)\\b/", $a, $match)) print(mb_strlen($match[1], "UTF-8")); ?>

preferences:
37.96 ms | 402 KiB | 5 Q