Created
June 23, 2019 14:43
-
-
Save macagua/004940174289bd12a8e7d03ad92410bf to your computer and use it in GitHub Desktop.
Hello world PHP CLI example
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 | |
if($argc != 2) { | |
echo "Use: php hello.php [name].\n"; | |
exit(1); | |
} | |
$name = $argv[1]; | |
echo "Hello, $name\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment