3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "this is school of sachin"; $pattern = "sch"; if(preg_match("/[A-Za-z]*".$pattern."([A-Za-z]*)/", $a, $match)) print(strlen($match[1])); ?>

preferences:
39.4 ms | 402 KiB | 5 Q