Last active
February 12, 2020 14:56
-
-
Save matthewpoer/f1639e5525efa3b9b2202ec2fa09579d to your computer and use it in GitHub Desktop.
Demonstrates how line endings affect echo output
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 | |
| echo "Counting to 10" . PHP_EOL; | |
| for($i = 0; $i < 10; $i++) { | |
| echo "Count is at {$i}\r"; | |
| usleep(500000); // half of one second | |
| } | |
| echo "Count is at {$i}" . PHP_EOL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
