3v4l.org

run code in 300+ 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:
26.84 ms | 405 KiB | 5 Q