3v4l.org

run code in 300+ PHP versions simultaneously
<?php $haystack = 'this is a school'; $pattern = 'sch'; $match = strstr($haystack, $pattern); $result = strlen($match) - strlen($pattern); ?>

preferences:
30.64 ms | 402 KiB | 5 Q