Last active
January 15, 2020 03:29
-
-
Save grant/431874891e7183317084fcd1bea5c6ce to your computer and use it in GitHub Desktop.
PHP HTTP Function
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 | |
use Symfony\Component\HttpFoundation\Request; | |
function helloHttp(Request $request) | |
{ | |
return sprintf("Hello %s from PHP HTTP function!" . PHP_EOL, | |
$request->query->get('name') ?: 'World' | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment