3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isSocial($url){ $patDom=array("\.*facebook\.[a-z]+\/","\.*twitter\.[a-z]+\/","\.*plus\.*google\.[a-z]+\/","\.*linkedin\.[a-z]+\/","\.*instagram\.[a-z]+\/","\.*myspcae\.[a-z]+\/","\.*pinterest\.[a-z]+\/"); foreach($patDom as $pat){ if(preg_match("/$pat/i",$url))return true; } return false; } $urls=array("http://facebook.com/hedayat.yazdani","http://plug.google.com/image/24","http://www.twitter.net/image/24","http://jointab.com"); foreach($urls as $key=>$value){ echo "$key - $value => is".(isSocial($value)?" ":" [not] ")."social network page\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
0 - http://facebook.com/hedayat.yazdani => is social network page 1 - http://plug.google.com/image/24 => is [not] social network page 2 - http://www.twitter.net/image/24 => is social network page 3 - http://jointab.com => is [not] social network page

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.55 ms | 401 KiB | 8 Q