Created
June 18, 2013 09:29
-
-
Save openprojdev/5803965 to your computer and use it in GitHub Desktop.
Revisions
-
openprojdev created this gist
Jun 18, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ $cdnHosts = array( //declared in an global config 'h1.hostname.com', 'h2.hostname.com', 'h3.hostname.com', 'h4.hostname.com' ); /** * * cdnHostNames * * @params array $cdnHosts containing all the hostnames * @return string the first string value of the circular shifted array */ function cdnHostNames(&$cdnHosts) { $cdnHosts = array_merge( array_slice($cdnHosts, 1), array_slice($cdnHosts, 0, 1) ) ; return $cdnHosts[0]; }