3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ ['foo=bar', 'email=foo@'], //invalid email ['foo=bar'], // no email, ['foo=bar', 'email=foo@example.com'], //valid email ]; foreach ($tests as $args) { load_args($args); print_filter(); } function load_args($args) { $str = implode("&", $args); echo "Loading $str into \$_GET\n"; parse_str($str, $_GET); } function print_filter() { $filter = filter_var_array($_GET, [ 'email' => FILTER_VALIDATE_EMAIL, ]); var_dump($filter); }
Output for git.master, git.master_jit, rfc.property-hooks
Loading foo=bar&email=foo@ into $_GET array(1) { ["email"]=> bool(false) } Loading foo=bar into $_GET array(1) { ["email"]=> NULL } Loading foo=bar&email=foo@example.com into $_GET array(1) { ["email"]=> string(15) "foo@example.com" }

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:
61.71 ms | 401 KiB | 8 Q