3v4l.org

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

preferences:
43.71 ms | 402 KiB | 5 Q