Created
June 16, 2015 01:07
-
-
Save kivlor/aa1bfaf688569a2a4d48 to your computer and use it in GitHub Desktop.
Silly little ticker...
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
<?php | |
$iteration = 0; | |
$ttl = 5; | |
$tickerCharacters = ['|','\\','-','/']; | |
while ($ttl > 0) { | |
$ttl -= 0.05; | |
time_nanosleep(0, 50000000); | |
echo "\033[1D"; | |
echo $tickerCharacters[$iteration%4]; | |
$iteration++; | |
} | |
echo "\033[2D"; | |
echo "\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Similar to the npm ticker