3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urls = array( "http://backend_dev.ms.ji-dev1.bgcc.at/", "asdf.bc", "http://google.at", "www.google.at", "https://service.justimmo.at/objekt" ); foreach ($urls as $url) { echo "\n"; if (filter_var($url, FILTER_VALIDATE_URL) === false) { echo("$url ########################### INVALID"); } else { echo("$url -- VALID"); } echo "\n"; var_dump(is_url($url)); } function is_url($uri){ if(preg_match( '/^(http|https):\\/\\/[a-z0-9_]+([\\-\\.]{1}[a-z_0-9]+)*\\.[_a-z]{2,5}'.'((:[0-9]{1,5})?\\/.*)?$/i' ,$uri)){ return $uri . " -- VALID"; } else{ return false; } }
Output for git.master, git.master_jit, rfc.property-hooks
http://backend_dev.ms.ji-dev1.bgcc.at/ ########################### INVALID string(47) "http://backend_dev.ms.ji-dev1.bgcc.at/ -- VALID" asdf.bc ########################### INVALID bool(false) http://google.at -- VALID string(25) "http://google.at -- VALID" www.google.at ########################### INVALID bool(false) https://service.justimmo.at/objekt -- VALID string(43) "https://service.justimmo.at/objekt -- VALID"

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