3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = explode(" ","This is a string, keyword next, some more text. keyword next-word."); echo $string[array_search("keyword",$string) + 1]; /* OUTPUT next, */ echo $string[array_search("keyword",$string) + 3]; /* OUTPUT more */

preferences:
108.33 ms | 1685 KiB | 5 Q