Skip to content
  • This project
    • Loading...
  • Sign in

Tran Phuong An / 16jason79_1

Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • 16jason79
  • wp-content
  • plugins
  • wordfence
  • lib
  • wfHelperString.php
  • Tran Phuong An's avatar
    Upload site · 0a0581dc
    0a0581dc Browse Files
    Tran Phuong An committed 2017-03-23 15:18:36 +0700
wfHelperString.php 323 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?php


class wfHelperString {

	/**
	 * cycle through arguments
	 *
	 * @return mixed
	 */
	public static function cycle() {
		static $counter = 0;
		$args = func_get_args();
		if (empty($args)) {
			$counter = 0;
			return null;
		}
		$return_val = $args[$counter % count($args)];
		$counter++;
		return $return_val;
	}
}