3v4l.org

run code in 300+ PHP versions simultaneously
<?php //FILTER_VAR email VALIDATION TEST: thanks http://us3.php.net/filter_var#112492 $valid_rfc_emails = array( 'localpart.ending.with.dot.@example.com', '(comment)localpart@example.com', '"this is v@lid!"@example.com', '"much.more unusual"@example.com', 'postbox@com', 'admin@mailserver1', '"()<>[]:,;@\\"\\\\!#$%&\'*+-/=?^_`{}| ~.a"@example.org', '" "@example.org', ); $valid = array(); $invalid = array(); foreach ($valid_rfc_emails as $address) { if (filter_var($address, FILTER_VALIDATE_EMAIL)){ $valid[] = $address; }else{ $invalid[] = $address; } } echo 'valid: '; print_r($valid); echo 'invalid (but really valid by rfc): '; print_r($invalid); ?>
Output for git.master, git.master_jit, rfc.property-hooks
valid: Array ( ) invalid (but really valid by rfc): Array ( [0] => localpart.ending.with.dot.@example.com [1] => (comment)localpart@example.com [2] => "this is v@lid!"@example.com [3] => "much.more unusual"@example.com [4] => postbox@com [5] => admin@mailserver1 [6] => "()<>[]:,;@\"\\!#$%&'*+-/=?^_`{}| ~.a"@example.org [7] => " "@example.org )

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:
36.15 ms | 402 KiB | 8 Q