3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "test@test.edu", "test@test.edu.pl", "test@test.com", "test.edu@test.com" ]; foreach ($strings as $string) { if (in_array("edu", explode(".", explode("@", $string)[1]))) { echo "$string contains .edu after @" . PHP_EOL; } else { echo "$string dot not contain .edu after @" . PHP_EOL;; } }

preferences:
31.63 ms | 405 KiB | 5 Q