3v4l.org

run code in 300+ PHP versions simultaneously
<?php function checkEmail($email) { return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email); } function checkEmail2($email) { return (bool)preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/", $email); } if (function_exists('eregi')){ echo "eregi:\n"; var_dump(checkEmail("jim@example.com")); var_dump(checkEmail("jim@example.comm")); } echo "preg_match:\n"; var_dump(checkEmail2("jim@example.com")); var_dump(checkEmail2("jim@example.comm"));
Output for git.master_jit, git.master, rfc.property-hooks
preg_match: bool(true) bool(false)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
52.01 ms | 401 KiB | 8 Q