3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "text/abc word two"; $result = substr( $string, strpos($string, '/') + 1); $result = substr( $result, 0, strpos( $result, 'word')); echo $result;

preferences:
36.93 ms | 402 KiB | 5 Q