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($url)?" ":" [not] ")."social network page"; }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $url in /in/uh0Ig on line 13 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 0 - http://facebook.com/hedayat.yazdani => is [not] social network page Warning: Undefined variable $url in /in/uh0Ig on line 13 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 1 - http://plug.google.com/image/24 => is [not] social network page Warning: Undefined variable $url in /in/uh0Ig on line 13 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 2 - http://www.twitter.net/image/24 => is [not] social network page Warning: Undefined variable $url in /in/uh0Ig on line 13 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/uh0Ig on line 6 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:
37.88 ms | 409 KiB | 8 Q