3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "my name is numbre 9000 900 1"; $dictionary = array("my", "name", "is", "number"); foreach(explode(' ',$string) as $wrd){ if(in_array($wrd, $dictionary) || is_numeric($wrd)){ echo $wrd . PHP_EOL; } else { echo $wrd."->wrong" . PHP_EOL; } }

preferences:
35.21 ms | 406 KiB | 5 Q