3v4l.org

run code in 300+ PHP versions simultaneously
<?php $example = 'This is an example of what I need.'; $words = str_word_count($example, 1); for ($x = 0; isset($words[$x + 2]); ++$x) { printf("%s %s %s\n", $words[$x], $words[$x + 1], $words[$x + 2]); }

preferences:
25.39 ms | 405 KiB | 5 Q