3v4l.org

run code in 300+ PHP versions simultaneously
<?php $method = 'subscribe_moeder'; $_POST['email'] = 'info@example.com'; if(function_exists('_'.$method)) call_user_func('_'.$method); else die(json_encode(array("alert('wrong request " . $method . "')"), JSON_FORCE_OBJECT)); function _subscribe_moeder(){ $email = $_POST['email']; if(!filter_var($email, FILTER_SANITIZE_EMAIL)) die(json_encode(array("$('#email').addClass('has-error')", 'alert("error")'), JSON_FORCE_OBJECT)); else die(json_encode(array("$('#email').removeClass('has-error')", 'alert("success")'), JSON_FORCE_OBJECT)); } // End function _subscribe_moeder ?>
Output for git.master, git.master_jit, rfc.property-hooks
{"0":"$('#email').removeClass('has-error')","1":"alert(\"success\")"}

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