Last active
March 15, 2018 17:53
-
-
Save shyuan/163458f0ce54991ba0fa9ec9526bfafb to your computer and use it in GitHub Desktop.
Reverse String from STDIN
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 | |
while ($string = trim(fgets(STDIN))) { | |
echo strrev($string) . PHP_EOL; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment