Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP - Native Constant for HTTP GET|PUT|POST

Are there any constants for "GET", "POST", etc. defined inside of the native php language, I have already tried:

HTTP_METH_GET

etc.
but without success

like image 518
Nickolaus Avatar asked May 26 '15 19:05

Nickolaus


People also ask

What is __ function __ in PHP?

__FUNCTION__ returns only the name of the function. while as __METHOD__ returns the name of the class alongwith the name of the function.

What is __ LINE __ PHP?

__LINE__ The current line number of the file. __FILE__ The full path and filename of the file with symlinks resolved. If used inside an include, the name of the included file is returned.

What is the use of Php_eol?

You use PHP_EOL when you want a new line, and you want to be cross-platform. This could be when you are writing files to the filesystem (logs, exports, other). You could use it if you want your generated HTML to be readable.

Which is a correct way to declare constant in PHP?

Create a PHP Constant To create a constant, use the define() function.


1 Answers

It has been a while since this was asked, but like mentioned in the comments there are no native constant predefined for GET HTTP Method GET.

This question should be set to 'answered'

like image 101
Joako-stackoverflow Avatar answered Sep 16 '22 23:09

Joako-stackoverflow