Created
June 18, 2024 22:41
-
-
Save terremoth/9230301a9ade7bb8d2641efda3a2aff0 to your computer and use it in GitHub Desktop.
Gets the input string from terminal stream and converts all the words to uppercase first chars
This file contains 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 | |
/** | |
* @author terremoth | |
* @license GNU General Public License, version 3 | |
*/ | |
$stream = file_get_contents("php://stdin"); | |
$rows = explode("\n", $stream); | |
foreach ($rows as $row) { | |
echo ucwords(strtolower($row)).PHP_EOL; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment