Created
March 18, 2019 12:46
-
-
Save kisildev/4a08f528ba9ae2d89d9b5f26f5ac5513 to your computer and use it in GitHub Desktop.
Once string display
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 characters
//Once string display | |
function once_str($string = '') { | |
static $foo_called = false; | |
if ($foo_called) return; | |
$foo_called = true; | |
echo $string; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment