PHP整数参数,例如curl_setopt和filter_var

I've been browsing the documentation relentlessly, but I just can't seem to figure out what it's called when a function uses an argument which has an int datatype. For example, in filter_var:

filter_var('bob@example.com', FILTER_VALIDATE_EMAIL);

... or in curl

curl_setopt($curl, CURLOPT_URL, 'http://example.com');

What is FILTER_VALIDATE_EMAIL and CURLOPT_URL called?

They are called Constants.

It just a variable, but because it is constant it should be written as Capital letters just to distinguish from other types of variables.That's the naming convention.

define('YOUR_CONSTANT', '894616466');
echo YOUR_CONSTANT;//894616466

These are called "Predefined Constants". They're published by category i.e.

http://www.php.net/manual/en/filter.constants.php

http://www.php.net/manual/en/curl.constants.php