standard

Standard library.

PHP version: 5

Required modules: none

Required packages: none

Also referred as the "core" library, it is a collection of the most used constants, functions and classes. The standard library is available on any PHP installation.

Some of the constant's values are actually dummy values intended only to give the right type to the constant, since the actual value does not care to PHPLint.

See: http://www.php.net/manual/en/


ABDAY_1 = 131072

ABDAY_2 = 131073

ABDAY_3 = 131074

ABDAY_4 = 131075

ABDAY_5 = 131076

ABDAY_6 = 131077

ABDAY_7 = 131078

ABMON_1 = 131086

ABMON_10 = 131095

ABMON_11 = 131096

ABMON_12 = 131097

ABMON_2 = 131087

ABMON_3 = 131088

ABMON_4 = 131089

ABMON_5 = 131090

ABMON_6 = 131091

ABMON_7 = 131092

ABMON_8 = 131093

ABMON_9 = 131094

ALT_DIGITS = 131119

AM_STR = 131110

ASSERT_ACTIVE = 1

ASSERT_BAIL = 3

ASSERT_CALLBACK = 2

ASSERT_QUIET_EVAL = 5

ASSERT_WARNING = 4

CASE_LOWER = 0

CASE_UPPER = 1

CHAR_MAX = 127

CODESET = 14

CONNECTION_ABORTED = 1

CONNECTION_NORMAL = 0

CONNECTION_TIMEOUT = 2

COUNT_NORMAL = 0

COUNT_RECURSIVE = 1

CREDITS_ALL = -1

CREDITS_DOCS = 16

CREDITS_FULLPAGE = 32

CREDITS_GENERAL = 2

CREDITS_GROUP = 1

CREDITS_MODULES = 8

CREDITS_QA = 64

CREDITS_SAPI = 4

CRNCYSTR = 262159

CRYPT_BLOWFISH = 0

CRYPT_EXT_DES = 0

CRYPT_MD5 = 1

CRYPT_SALT_LENGTH = 12

CRYPT_STD_DES = 1

CRYPT_SHA256 = 5001

CRYPT_SHA512 = 5002

C_EXPLICIT_ABSTRACT = 32

C_FINAL = 64

C_IMPLICIT_ABSTRACT = 16

DAY_1 = 131079

DAY_2 = 131080

DAY_3 = 131081

DAY_4 = 131082

DAY_5 = 131083

DAY_6 = 131084

DAY_7 = 131085

DEFAULT_INCLUDE_PATH = ".:"

DIRECTORY_SEPARATOR = "/"

DNS_A = 1

DNS_AAAA = 134217728

DNS_ALL = 234936371

DNS_ANY = 268435456

DNS_CNAME = 16

DNS_HINFO = 4096

DNS_MX = 16384

DNS_NAPTR = 67108864

DNS_NS = 2

DNS_PTR = 2048

DNS_SOA = 32

DNS_SRV = 33554432

DNS_TXT = 32768

D_FMT = 131113

D_T_FMT = 131112

ENT_COMPAT = 2

ENT_NOQUOTES = 0

ENT_QUOTES = 3

ERA = 131116

ERA_D_FMT = 131118

ERA_D_T_FMT = 131120

ERA_T_FMT = 131121

EXTR_IF_EXISTS = 6

EXTR_OVERWRITE = 0

EXTR_PREFIX_ALL = 3

EXTR_PREFIX_IF_EXISTS = 5

EXTR_PREFIX_INVALID = 4

EXTR_PREFIX_SAME = 2

EXTR_REFS = 256

EXTR_SKIP = 1

E_ALL = 2047

E_COMPILE_ERROR = 64

E_COMPILE_WARNING = 128

E_CORE_ERROR = 16

E_CORE_WARNING = 32

E_ERROR = 1

E_NOTICE = 8

E_PARSE = 4

E_RECOVERABLE_ERROR = 4096

E_STRICT = 2048

E_USER_ERROR = 256

E_USER_NOTICE = 1024

E_USER_WARNING = 512

E_WARNING = 2

FILE_APPEND = 8

FILE_IGNORE_NEW_LINES = 2

FILE_NO_DEFAULT_CONTEXT = 16

FILE_SKIP_EMPTY_LINES = 4

FILE_USE_INCLUDE_PATH = 1

FNM_CASEFOLD = 16

FNM_NOESCAPE = 2

FNM_PATHNAME = 1

FNM_PERIOD = 4

GLOB_BRACE = 1024

GLOB_MARK = 2

GLOB_NOCHECK = 16

GLOB_NOESCAPE = 64

GLOB_NOSORT = 4

GLOB_ONLYDIR = 8192

HTML_ENTITIES = 1

HTML_SPECIALCHARS = 0


INF = 0.0

(dummy value)


INFO_ALL = -1

INFO_CONFIGURATION = 4

INFO_CREDITS = 2

INFO_ENVIRONMENT = 16

INFO_GENERAL = 1

INFO_LICENSE = 64

INFO_MODULES = 8

INFO_VARIABLES = 32

INI_ALL = 7

INI_PERDIR = 2

INI_SYSTEM = 4

INI_USER = 1

LC_ALL = 6

LC_COLLATE = 3

LC_CTYPE = 0

LC_MESSAGES = 5

LC_MONETARY = 4

LC_NUMERIC = 1

LC_TIME = 2

LOCK_EX = 2

LOCK_NB = 4

LOCK_SH = 1

LOCK_UN = 3

LOG_ALERT = 1

LOG_AUTH = 32

LOG_AUTHPRIV = 80

LOG_CONS = 2

LOG_CRIT = 2

LOG_CRON = 72

LOG_DAEMON = 24

LOG_DEBUG = 7

LOG_EMERG = 0

LOG_ERR = 3

LOG_INFO = 6

LOG_KERN = 0

LOG_LOCAL0 = 128

LOG_LOCAL1 = 136

LOG_LOCAL2 = 144

LOG_LOCAL3 = 152

LOG_LOCAL4 = 160

LOG_LOCAL5 = 168

LOG_LOCAL6 = 176

LOG_LOCAL7 = 184

LOG_LPR = 48

LOG_MAIL = 16

LOG_NDELAY = 8

LOG_NEWS = 56

LOG_NOTICE = 5

LOG_NOWAIT = 16

LOG_ODELAY = 4

LOG_PERROR = 32

LOG_PID = 1

LOG_SYSLOG = 40

LOG_USER = 8

LOG_UUCP = 64

LOG_WARNING = 4

MON_1 = 131098

MON_10 = 131107

MON_11 = 131108

MON_12 = 131109

MON_2 = 131099

MON_3 = 131100

MON_4 = 131101

MON_5 = 131102

MON_6 = 131103

MON_7 = 131104

MON_8 = 131105

MON_9 = 131106

M_1_PI = 0.31830988618379

M_2_PI = 0.63661977236758

M_2_SQRTPI = 1.1283791670955

M_ABSTRACT = 2

M_E = 2.718281828459

M_FINAL = 4

M_LN10 = 2.302585092994

M_LN2 = 0.69314718055995

M_LOG10E = 0.43429448190325

M_LOG2E = 1.442695040889

M_PI = 3.1415926535898

M_PI_2 = 1.5707963267949

M_PI_4 = 0.78539816339745

M_PRIVATE = 1024

M_PROTECTED = 512

M_PUBLIC = 256

M_SQRT1_2 = 0.70710678118655

M_SQRT2 = 1.4142135623731

M_STATIC = 1


NAN = 0.0

(dummy value)


NOEXPR = 327681

PATHINFO_BASENAME = 2

PATHINFO_DIRNAME = 1

PATHINFO_EXTENSION = 4

PATH_SEPARATOR = ":"

PEAR_EXTENSION_DIR = "/usr/local/php-5.0.1/lib/php/extensions/no-debug-non-zts-20040412"

PEAR_INSTALL_DIR = ""

PHP_BINDIR = "/usr/local/php-5.0.1/bin"

PHP_CONFIG_FILE_PATH = "/usr/local/php-5.0.1/lib"

PHP_CONFIG_FILE_SCAN_DIR = ""

PHP_DATADIR = "/usr/local/php-5.0.1/share/php"

PHP_EOL = "\n"

PHP_EXTENSION_DIR = "/usr/local/php-5.0.1/lib/php/extensions/no-debug-non-zts-20040412"

PHP_LIBDIR = "/usr/local/php-5.0.1/lib/php"

PHP_LOCALSTATEDIR = "/usr/local/php-5.0.1/var"

PHP_OS = "Linux"

PHP_OUTPUT_HANDLER_CONT = 2

PHP_OUTPUT_HANDLER_END = 4

PHP_OUTPUT_HANDLER_START = 1

PHP_PREFIX = "/usr/local/php-5.0.1"

PHP_ROUND_HALF_UP = 1

PHP_ROUND_HALF_DOWN = 2

PHP_ROUND_HALF_EVEN = 3

PHP_ROUND_HALF_ODD = 4

PHP_SAPI = "cgi"

PHP_SHLIB_SUFFIX = "so"

PHP_SYSCONFDIR = "/usr/local/php-5.0.1/etc"

PHP_VERSION = "5.0.1"

PHP_INT_SIZE = 4

PHP_INT_MAX = 2147483647

PM_STR = 131111

PSFS_ERR_FATAL = 0

PSFS_FEED_ME = 1

PSFS_FLAG_FLUSH_CLOSE = 2

PSFS_FLAG_FLUSH_INC = 1

PSFS_FLAG_NORMAL = 0

PSFS_PASS_ON = 2

P_PRIVATE = 1024

P_PROTECTED = 512

P_PUBLIC = 256

P_STATIC = 1

RADIXCHAR = 65536

SEEK_CUR = 1

SEEK_END = 2

SEEK_SET = 0

SORT_ASC = 4

SORT_DESC = 3

SORT_NUMERIC = 1

SORT_REGULAR = 0

SORT_STRING = 2

STR_PAD_BOTH = 2

STR_PAD_LEFT = 0

STR_PAD_RIGHT = 1

SUNFUNCS_RET_DOUBLE = 2

SUNFUNCS_RET_STRING = 1

SUNFUNCS_RET_TIMESTAMP = 0

THOUSEP = 65537

T_FMT = 131114

T_FMT_AMPM = 131115

UPLOAD_ERR_OK = 0

UPLOAD_ERR_INI_SIZE = 1

UPLOAD_ERR_FORM_SIZE = 2

UPLOAD_ERR_PARTIAL = 3

UPLOAD_ERR_NO_FILE = 4

UPLOAD_ERR_NO_TMP_DIR = 6

UPLOAD_ERR_CANT_WRITE = 7

UPLOAD_ERR_EXTENSION = 8

YESEXPR = 327680

ZEND_THREAD_SAFE = FALSE

PHP_DEBUG = 1

PHP_EXTRA_VERSION = "?"

PHP_MAJOR_VERSION = 1

PHP_MAXPATHLEN = 1

PHP_MINOR_VERSION = 1

PHP_RELEASE_VERSION = 1

PHP_VERSION_ID = 1

PHP_ZTS = 1

__COMPILER_HALT_OFFSET__ = 1

E_DEPRECATED = 8192

E_USER_DEPRECATED = 16384

PHP_WINDOWS_VERSION_MAJOR = 1

PHP_WINDOWS_VERSION_MINOR = 1

PHP_WINDOWS_VERSION_BUILD = 1

PHP_WINDOWS_VERSION_PLATFORM = 1

PHP_WINDOWS_VERSION_SP_MAJOR = 1

PHP_WINDOWS_VERSION_SP_MINOR = 1

PHP_WINDOWS_VERSION_SUITEMASK = 1

PHP_WINDOWS_VERSION_PRODUCTTYPE = 1

PHP_WINDOWS_NT_DOMAIN_CONTROLLER = 1

PHP_WINDOWS_NT_SERVER = 1

PHP_WINDOWS_NT_WORKSTATION = 1

INI_SCANNER_NORMAL = 1

INI_SCANNER_RAW = 1

DEBUG_BACKTRACE_PROVIDE_OBJECT = 1

DEBUG_BACKTRACE_IGNORE_ARGS = 2

DATE_ATOM = "?"

DATE_COOKIE = "?"

DATE_ISO8601 = "?"

DATE_RFC822 = "?"

DATE_RFC850 = "?"

DATE_RFC1036 = "?"

DATE_RFC1123 = "?"

DATE_RFC2822 = "?"

DATE_RFC3339 = "?"

DATE_RSS = "?"

DATE_W3C = "?"

int $argc

string[int] $argv

mixed constant(
        string $name)

string bin2hex(
        string $str)

string hex2bin(
        string $str)

int sleep(
        int $secs)

void usleep(
        int $microsecs)

mixed time_nanosleep(
        int $secs,
        int $nanosecs)

int time()

int mktime(...)

int gmmktime(...)

string strftime(
        string $fmt, ...)

string gmstrftime(
        string $fmt, ...)

int strtotime(
        string $time, ...)

string date(
        string $fmt, ...)

int idate(
        string $fmt, ...)

string gmdate(
        string $fmt, ...)

mixed[string] getdate(...)

int[] localtime(
        int $timestamp = 0,
        boolean $is_associative = FALSE)

triggers E_WARNING, E_NOTICE

boolean checkdate(
        int $month,
        int $day,
        int $year)

void flush()

string wordwrap(
        string $s,
        int $width = 75,
        string $break_ = "\n",
        boolean $cut = FALSE)

string htmlspecialchars(
        string $s,
        int $quote_style = 2,
        string $charset = "ISO-8859-1",
        boolean $double_encode = TRUE)

string htmlspecialchars_decode(
        string $s,
        int $quote_style = 2)

string htmlentities(
        string $s,
        int $quote_style = 2,
        string $charset = "ISO-8859-1",
        boolean $double_encode = TRUE)

string html_entity_decode(
        string $s,
        int $quote_style = 2,
        string $charset = "ISO-8859-1")

string[string] get_html_translation_table(
        int $table = 0,
        int $quote_style = 2)

int realpath_cache_size()

mixed[] realpath_cache_get()

int crc32(
        string $str)

boolean phpinfo(
        int $what = -1)

string phpversion(...)

boolean phpcredits(
        int $flag = -1)

string php_logo_guid()

string zend_logo_guid()

string php_sapi_name()

string php_uname(
        string $mode = "a")

string php_ini_loaded_file()

string php_ini_scanned_files()

int strnatcmp(
        string $s1,
        string $s2)

int strnatcasecmp(
        string $s1,
        string $s2)

int strcasecmp(
        string $s1,
        string $s2)

int substr_count(
        string $haystack,
        string $needle)

int strspn(
        string $str1,
        string $str2, ...)

int strcspn(
        string $str1,
        string $str2, ...)

string strtok(
        string $str,
        string $token)

string strtoupper(
        string $s)

string strtolower(
        string $s)

int strpos(
        string $haystack,
        mixed $needle, ...)

int stripos(
        string $haystack,
        string $needle, ...)

int strrpos(
        string $haystack,
        string $needle, ...)

int strripos(
        string $haystack,
        string $needle, ...)

string strrev(
        string $s)

string hebrev(
        string $str,
        int $max_chars_per_line = 0)

string hebrevc(
        string $str,
        int $max_chars_per_line = 0)

string nl2br(
        string $s,
        boolean $is_xhtml = TRUE)

string basename(
        string $path, ...)

string dirname(
        string $path)

string[string] pathinfo(
        string $path, ...)

string stripslashes(
        string $s)

string stripcslashes(
        string $str)

string strstr(
        string $haystack,
        mixed $needle, ...)

string strchr(
        string $haystack,
        string $needle)

string stristr(
        string $haystack,
        mixed $needle, ...)

string strrchr(
        string $haystack,
        mixed $needle)

string str_shuffle(
        string $str)

mixed str_word_count(
        string $str, ...)

string[int] str_split(
        string $s,
        int $split_length = 1)

string strpbrk(
        string $haystack,
        string $charlist)

int substr_compare(
        string $main_str,
        string $str,
        int $offset, ...)

int strcoll(
        string $str1,
        string $str2)


string money_format(
        string $format,
        float $number_)

Deprecated: this function is not available on Windows


string substr(
        string $s,
        int $start, ...)

mixed substr_replace(
        mixed $s,
        string $replacement,
        int $start, ...)

string quotemeta(
        string $str)

string ucfirst(
        string $str)

string ucwords(
        string $str)

string strtr(
        string $s,
        mixed $x, ...)

string addslashes(
        string $str)

string addcslashes(
        string $str,
        string $charlist)

string rtrim(
        string $s,
        string $charlist = " \t\n\r\x00\x0B")

string chop(
        string $s,
        string $charlist = " \t\n\r\x00\x0B")

mixed str_replace(
        mixed $search,
        mixed $replace,
        mixed $subject, ...)

mixed str_ireplace(
        mixed $search,
        mixed $replace,
        mixed $subject, ...)

string str_repeat(
        string $s,
        int $n)

mixed count_chars(
        string $str,
        int $mode = 0)

string chunk_split(
        string $body,
        int $chunklen = 76,
        string $end = "\r\n")

string trim(
        string $str,
        string $charlist = " \t\n\r\x00\x0B")

string ltrim(
        string $str,
        string $charlist = " \t\n\r\x00\x0B")

string strip_tags(
        string $str, ...)

int similar_text(
        string $first,
        string $second, ...)

string[int] explode(
        string $sep,
        string $s, ...)


string implode(
        string $glue,
        string[] $pieces)

ATTENTION!

The actual PHP function also accepts one single array assuming glue to be the empty string. Rewrite as implode("", array) to comply with this declaration.


string join(
        string $glue,
        string[] $pieces)

string setlocale(
        int $category,
        mixed $locale, ...)

mixed[string] localeconv()

string nl_langinfo(
        int $item)

string soundex(
        string $str)

int levenshtein(
        string $str1,
        string $str2, ...)

string chr(
        int $c)

int ord(
        string $s)

void parse_str(
        string $str, ...)

string str_pad(
        string $input,
        int $pad_length,
        string $pad_string = " ",
        int $pad_type = 1)

string sprintf(
        string $fmt, ...)

string printf(
        string $fmt, ...)

int vprintf(
        string $format,
        mixed[] $args_)

string vsprintf(
        string $format,
        mixed[] $args_)

int fprintf(
        resource $f,
        string $fmt, ...)

int vfprintf(
        resource $handle,
        string $format,
        mixed[] $args_)

mixed sscanf(
        string $str,
        string $fmt, ...)

mixed fscanf(
        resource $handle,
        string $format, ...)

string[string] parse_url(
        string $url,
        int $component = -1)

triggers E_WARNING

string urlencode(
        string $s)

string urldecode(
        string $s)

string rawurlencode(
        string $str)

string rawurldecode(
        string $str)

string http_build_query(
        mixed[] $formdata, ...)

string readlink(
        string $path)

int linkinfo(
        string $path)

boolean symlink(
        string $target,
        string $link)

boolean link(
        string $target,
        string $link)

boolean unlink(
        string $filename, ...)

triggers E_WARNING

string exec(
        string $command, ...)

string system(
        string $command, ...)

string escapeshellcmd(
        string $command)

string escapeshellarg(
        string $arg)

void passthru(
        string $command, ...)

string shell_exec(
        string $cmd)

resource proc_open(
        string $cmd,
        string[int][int] $descriptorspec,
        return resource[] & $pipes, ...)

int proc_close(
        resource $process)

int proc_terminate(
        resource $process, ...)

mixed[string] proc_get_status(
        resource $process)

boolean proc_nice(
        int $increment)

int rand(...)

void srand(...)

int getrandmax()

int mt_rand(...)

void mt_srand(...)

int mt_getrandmax()

int getservbyname(
        int $service,
        string $protocol)

string getservbyport(
        int $port,
        string $protocol)

int getprotobyname(
        string $name)

string getprotobynumber(
        int $number_)

int getmyuid()

int getmygid()

int getmypid()

int getmyinode()

int getlastmod()

string base64_decode(
        string $s)

string base64_encode(
        string $s)

string convert_uuencode(
        string $data)

string convert_uudecode(
        string $data)


float abs(
        float $n)

Returns the absolute value of the argument

Warning. This function can be applied to int values as well when an int result is expected, but this is not the case when the int value is the maximum negative int, in fact the result is float:

abs(-PHP_INT_MAX-1) ==> float(2147483648)
and applying the typecast required by PHPLint we end with an unexpected negative number:
(int) abs(-PHP_INT_MAX-1) ==> int(-2147483648)
	rather than the expected 0 as a result of the 2-complement. If you really
	need the common behaviour of a true abs() function applied to int, consider
	this expression instead that calculates the 2-complement:
	<pre>$i >= 0? $i : (($i ^ PHP_INT_MAX) + 1) & PHP_INT_MAX
or even:
$i == -PHP_INT_MAX - 1? 0 : (int) abs($i)
If, instead, you are only interested to drop the sign, simply do this:
$i ^ PHP_INT_MAX

Return: The absolute value of the argument.


float acos(
        float $x)

float acosh(
        float $x)

float asin(
        float $x)

float asinh(
        float $x)

float atan(
        float $x)

float atan2(
        float $y,
        float $x)

float atanh(
        float $x)

float ceil(
        float $x)

float cos(
        float $x)

float cosh(
        float $x)

float expm1(
        float $x)

float floor(
        float $x)

float log1p(
        float $x)

float round(
        float $x,
        int $precision = 0,
        int $mode = 1)

float sin(
        float $x)

float sinh(
        float $x)

float tan(
        float $x)

float tanh(
        float $x)

float pi()

boolean is_finite(
        float $val)

boolean is_nan(
        float $val)

boolean is_infinite(
        float $val)

float pow(
        float $base,
        float $esp)

float exp(
        float $x)

float log(
        float $x)

float log10(
        float $x)

float sqrt(
        float $x)

float hypot(
        float $x,
        float $y)

float deg2rad(
        float $number_)

float rad2deg(
        float $number_)

float bindec(
        string $binary)

float hexdec(
        string $hex)

float octdec(
        string $oct)

string decbin(
        int $number_)

string decoct(
        int $number_)

string dechex(
        int $number_)

string base_convert(
        string $number_,
        int $frombase,
        int $tobase)


string number_format(
        float $n,
        int $decimals = 0,
        string $dec_point = ".",
        string $thousands_sep = ",")

WARNING. This function cannot be called with 3 arguments. Instead,

you MUST either provide one, two or four arguments.


float fmod(
        float $x,
        float $y)

int ip2long(
        string $ip_address)

string long2ip(
        int $proper_address)

string getenv(
        string $varname)

boolean putenv(
        string $setting)

string[string][int] getopt(
        string $options, ...)

mixed microtime(
        boolean $get_as_float = FALSE)

int[string] gettimeofday()

int[string] getrusage(
        int $who = 0)

string uniqid(
        string $prefix = "",
        boolean $more_entropy = FALSE)

string quoted_printable_decode(
        string $str)

string quoted_printable_encode(
        string $str)

string convert_cyr_string(
        string $str,
        string $from,
        string $to)

string get_current_user()

void set_time_limit(
        int $seconds)

string get_cfg_var(
        string $varname)


boolean set_magic_quotes_runtime(
        int $new_setting)


int get_magic_quotes_gpc()

int get_magic_quotes_runtime()


boolean import_request_variables(
        string $types,
        string $prefix)

Official manual states that the second arguments is de-facto

Deprecated: since PHP 5.4

mandatory, altough being formally optional. Then the declaration here given is the most conservative one to prevent errors.


boolean error_log(
        string $message, ...)

mixed call_user_func(
        mixed $func, ...)

mixed call_user_func_array(
        mixed $func,
        mixed[int] $param_arr)

triggers E_WARNING


mixed call_user_method(
        string $method_name,
        object & $obj, ...)

Deprecated: Use call_user_func_array() instead.


mixed call_user_method_array(
        string $method_name,
        object & $obj,
        mixed[int] $paramarr)

Deprecated: Use call_user_func_array() instead.


string serialize(
        mixed $value)

mixed unserialize(
        string $s)

triggers E_NOTICE

Under PHP 5, please apply cast() to the result.

For example, if the intended result must be an object:

$obj = cast("MyClass", unserialize($serialized_data));

or if the expected result must be an array:

$arr = cast("array[int]MyClass", unserialize($serialized_data)(;

Warning. Raises E_NOTICE if the data are corrupted.


void var_dump(
        mixed $x, ...)

string var_export(
        mixed $x, ...)

void debug_zval_dump(
        mixed $variable)

mixed print_r(
        mixed $expr,
        boolean $return_ = FALSE)

void register_shutdown_function(
        mixed $func, ...)


boolean register_tick_function(
        mixed $func, ...)

Deprecated: See the manual for details.


void unregister_tick_function(
        string $func)

mixed highlight_file(
        string $filename, ...)

mixed show_source(
        string $filename, ...)

mixed highlight_string(
        string $str, ...)

string php_strip_whitespace(
        string $filename)


boolean php_check_syntax(
        string $filename, ...)

Deprecated: For technical reasons, this function is deprecated and removed from PHP. Instead, use php -l somefile.php from the commandline. Or, even better, use PHPLint.


string ini_get(
        string $varname)

Gets the value of a configuration option

Returns the value of the configuration option on success. Failure, such as querying for a non-existent value, will return an empty string. Boolean values are returned as "0" for FALSE, "1" for "TRUE". Some parameters have the default value NULL, and this value gets returned if the paramenter isn't defined in the php.ini. Some values uses a special format, for example "upload_max_filesize = 10M": take a look to the official WEB site for an example on how to parse these values. A typical example:

if ( ini_get("magic_quotes_gpc") === "1" )
	$s = stripslashes($s);


mixed[string][string] ini_get_all(...)

string ini_set(
        string $varname,
        string $newvalue)

string ini_alter(
        string $varname,
        string $newvalue)

void ini_restore(
        string $varname)

string get_include_path()

string set_include_path(
        string $new_inc_path)

void restore_include_path()

boolean setcookie(
        string $n, ...)

boolean setrawcookie(
        string $n, ...)

void header(
        string $s, ...)

void header_remove(
        string $name = NULL)

boolean headers_set(...)

string[int] headers_list()

int connection_aborted()

int connection_status()

int ignore_user_abort(...)

mixed[string][string] parse_ini_file(
        string $filename, ...)

boolean is_uploaded_file(
        string $fn)

boolean move_uploaded_file(
        string $fn,
        string $dst)

string gethostbyaddr(
        string $ip)

string gethostbyname(
        string $hn)

string gethostname()

string[int] gethostbynamel(
        string $hostname)

boolean dns_check_record(
        string $host, ...)

boolean checkdnsrr(
        string $host, ...)

boolean dns_get_mx(
        string $hostname,
        return string[int] & $mxhosts, ...)

boolean getmxrr(
        string $hostname,
        return string[int] & $a, ...)

mixed[int][string] dns_get_record(
        string $hostname, ...)

int intval(
        mixed $v, ...)

float floatval(
        mixed $v)

float doubleval(
        mixed $v)

string strval(
        mixed $v)

string gettype(
        mixed $variable)


boolean settype(
        mixed & $v,
        string $type)

Deprecated: the variable's type is always statically determined under PHPLint and cannot be changed at runtime


boolean is_null(
        mixed $v)

boolean is_resource(
        mixed $v)

boolean is_bool(
        mixed $v)

boolean is_long(
        mixed $v)

boolean is_float(
        mixed $v)

boolean is_int(
        mixed $v)

boolean is_integer(
        mixed $v)

boolean is_double(
        mixed $v)

boolean is_real(
        mixed $v)

boolean is_numeric(
        mixed $v)

boolean is_string(
        mixed $v)

boolean is_array(
        mixed $v)

boolean is_object(
        mixed $v)

boolean is_scalar(
        mixed $v)

boolean is_callable(
        mixed $f, ...)


boolean dl(
        string $lib)

Deprecated: As of PHP 5, the dl() function is deprecated in every SAPI except CLI. Use Extension Loading Directives method instead.


int pclose(
        resource $handle)

resource popen(
        string $cmd,
        string $mode)

triggers E_WARNING

int readfile(
        string $fn, ...)

triggers E_WARNING

boolean rewind(
        resource $handle)

boolean rmdir(
        string $dirname, ...)

triggers E_WARNING

int umask(...)

boolean fclose(
        resource $f)

triggers E_WARNING

boolean feof(
        resource $f)

string fgetc(
        resource $h)

triggers E_WARNING

string fgets(
        resource $f, ...)

triggers E_WARNING

string fgetss(
        resource $f, ...)

triggers E_WARNING

string fread(
        resource $f,
        int $length)

triggers E_WARNING

resource fopen(
        string $filename,
        string $mode, ...)

triggers E_WARNING

int fpassthru(
        resource $handle)

triggers E_WARNING

boolean ftruncate(
        resource $handle,
        int $size)

triggers E_WARNING

int[string] fstat(
        resource $handle)

triggers E_WARNING

int fseek(
        resource $handle,
        int $offset, ...)

triggers E_WARNING

int ftell(
        resource $handle)

boolean fflush(
        resource $handle)

triggers E_WARNING

int fwrite(
        resource $handle,
        string $s, ...)

triggers E_WARNING

int fputs(
        resource $handle,
        string $s, ...)

triggers E_WARNING

boolean mkdir(
        string $pathname, ...)

triggers E_WARNING

boolean rename(
        string $oldname,
        string $newname, ...)

triggers E_WARNING

boolean copy(
        string $source,
        string $dest, ...)

triggers E_WARNING

string tempnam(
        string $dir,
        string $prefix)

resource tmpfile()

string[int] file(
        string $filename, ...)

triggers E_WARNING

string file_get_contents(
        string $fn, ...)

triggers E_WARNING

int file_put_contents(
        string $fn,
        string $data, ...)

triggers E_WARNING

string[int] fgetcsv(
        resource $handle, ...)

triggers E_WARNING

boolean flock(
        resource $handle,
        int $op, ...)

triggers E_WARNING

string[string] get_meta_tags(
        string $fn, ...)

triggers E_WARNING

int set_file_buffer(
        resource $stream,
        int $buffer)

string realpath(
        string $path)

boolean fnmatch(
        string $pattern,
        string $str, ...)

resource fsockopen(
        string $target,
        int $port = 0,
        return int & $errno = 0,
        return string & $errstr = "",
        float $timeout = 0.0)

triggers E_WARNING

resource pfsockopen(
        string $hostname, ...)

triggers E_WARNING

string pack(
        string $format, ...)

mixed[string] unpack(
        string $format,
        string $data)

mixed get_browser(...)

string crypt(
        string $str,
        string $salt = "")

resource opendir(
        string $path, ...)

triggers E_WARNING

void closedir(
        resource $dirhandle)

boolean chdir(
        string $dir)

triggers E_WARNING

boolean chroot(
        string $dir)

triggers E_WARNING

string getcwd()

void rewinddir(
        resource $dir_handle)

triggers E_WARNING

string readdir(
        resource $dir_handle)

triggers E_WARNING

Directory dir(
        string $directory, ...)

triggers E_WARNING

string[int] scandir(
        string $dir, ...)

triggers E_WARNING

string[int] glob(
        string $pattern, ...)

int fileatime(
        string $fn)

triggers E_WARNING

int filectime(
        string $fn)

triggers E_WARNING

int filegroup(
        string $fn)

triggers E_WARNING

int fileinode(
        string $fn)

triggers E_WARNING

int filemtime(
        string $fn)

triggers E_WARNING

int fileowner(
        string $fn)

triggers E_WARNING

int fileperms(
        string $fn)

triggers E_WARNING

int filesize(
        string $filename)

triggers E_WARNING

string filetype(
        string $fn)

triggers E_WARNING

boolean file_exists(
        string $fn)

boolean is_writable(
        string $fn)

boolean is_writeable(
        string $fn)

boolean is_readable(
        string $fn)

boolean is_executable(
        string $fn)

boolean is_file(
        string $fn)

boolean is_dir(
        string $fn)

boolean is_link(
        string $fn)

int[] stat(
        string $fn)

triggers E_WARNING

int[] lstat(
        string $fn)

triggers E_WARNING

boolean chown(
        string $fn,
        mixed $user)

triggers E_WARNING

boolean chgrp(
        string $fn,
        mixed $group)

triggers E_WARNING

boolean chmod(
        string $fn,
        int $mode)

triggers E_WARNING

boolean touch(
        string $fn, ...)

triggers E_WARNING

void clearstatcache(...)

float disk_total_space(
        string $dir)

triggers E_WARNING

float disk_free_space(
        string $dir)

triggers E_WARNING

float diskfreespace(
        string $dir)

triggers E_WARNING

boolean mail(
        string $to,
        string $subj,
        string $msg, ...)

int ezmlm_hash(
        string $addr)

boolean openlog(
        string $ident,
        int $option,
        int $facility)

boolean syslog(
        int $priority,
        string $msg)

boolean closelog()


void define_syslog_variables()
triggers E_DEPRECATED

Deprecated: since PHP 5.3.0


float lcg_value()

string metaphone(
        string $str, ...)

boolean ob_start(...)

void ob_flush()

void ob_clean()

boolean ob_end_flush()

boolean ob_end_clean()

boolean ob_get_flush()

string ob_get_clean()

int ob_get_length()

int ob_get_level()

mixed[] ob_get_status(...)

string ob_get_contents()

void ob_implicit_flush(...)

mixed[] ob_list_handlers()

boolean ksort(
        mixed[] $array_arg,
        int $sort_flags = 0)

boolean krsort(
        mixed[] $array_arg,
        int $sort_flags = 0)

void natsort(
        mixed[] $array_arg)

void natcasesort(
        mixed[] $array_arg)

boolean asort(
        mixed[] $a,
        int $sort_flags = 0)

boolean arsort(
        mixed[] $a,
        int $sort_flags = 0)


boolean sort(
        mixed[int] $a,
        int $sort_flags = 0)

Warning: indexes must really be int.

That is because in any case this function changes the type of the array into array[int].


boolean rsort(
        mixed[int] $a,
        int $sort_flags = 0)

Warning: indexes must really be int.

That is because in any case this function changes the type of the array into array[int].


boolean usort(
        mixed[int] $a,
        mixed $cmp_func)

Warning: indexes must really be int.

That is because in any case this function changes the type of the array into array[int].


boolean uasort(
        mixed[] $a,
        mixed $cmp_func)

boolean uksort(
        mixed[] $a,
        mixed $cmp_func)

boolean shuffle(
        mixed[] $array_arg)

boolean array_walk(
        mixed[] $input,
        mixed $funcname, ...)

boolean array_walk_recursive(
        mixed[] $input,
        mixed $funcname, ...)

int count(
        mixed $a, ...)

int sizeof(
        mixed[] $a, ...)

mixed end(
        mixed[] $a)

mixed prev(
        mixed[] $a)

mixed next(
        mixed[] $a)

mixed reset(
        mixed[] $a)

mixed current(
        mixed[] $a)

mixed key(
        mixed[] $array_arg)

float min(
        float $a,
        float $b, ...)


float max(
        float $a,
        float $b, ...)

Actually the max() function has a more complex semantic that cannot be effectively expressed using the restrictive syntax of PHPLint. The arguments can be of the type int or float, and the result can be either int or float; a single array of numbers is also allowed. The syntax described here should be the most useful one, with two or more int or float numbers and returning a float. If the required result must be int, use a cast: $m = (int) max($count1, $count2);.


boolean in_array(
        mixed $needle,
        mixed[] $haystack, ...)

mixed array_search(
        mixed $needle,
        mixed[] $hatstack, ...)

int extract(
        mixed[string] $var_array, ...)

mixed[string] compact(
        mixed $var_names, ...)

mixed[] range(
        mixed $low,
        mixed $high, ...)

mixed[] array_change_key_case(
        mixed[] $a, ...)

mixed[int][] array_chunk(
        mixed[] $a,
        int $size,
        boolean $preserve_keys = FALSE)

triggers E_WARNING

mixed[] array_combine(
        mixed[] $keys,
        mixed[] $values)

triggers E_WARNING

mixed[] array_count_values(
        mixed[] $input)

triggers E_WARNING

mixed[] array_diff(
        mixed[] $arr1,
        mixed[] $arr2, ...)

mixed[] array_diff_key(
        mixed[] $arr1,
        mixed[] $arr2, ...)

mixed[] array_diff_assoc(
        mixed[] $arr1,
        mixed[] $arr2, ...)

mixed[] array_diff_uassoc(
        mixed[] $arr1,
        mixed[] $arr2, ...)

mixed[] array_fill(
        int $start_key,
        int $num,
        mixed $val)

triggers E_WARNING

mixed[] array_filter(
        mixed[] $input, ...)

mixed[] array_flip(
        mixed[] $input)

mixed[] array_intersect(
        mixed[] $arr1,
        mixed[] $arr2, ...)

mixed[] array_intersect_assoc(
        mixed[] $arr1,
        mixed[] $arr2, ...)

mixed[] array_intersect_uassoc(
        mixed[] $arr1,
        mixed[] $arr2, ...)

boolean array_key_exists(
        mixed $key,
        mixed[] $search)

mixed[int] array_keys(
        mixed[] $input, ...)

mixed[] array_map(
        mixed $callback,
        mixed[] $a1, ...)

mixed[] array_merge(
        mixed[] $a1,
        mixed[] $a2, ...)

mixed[] array_merge_recursive(
        mixed[] $arr1,
        mixed[] $arr2, ...)

boolean array_multisort(
        mixed[] $ar1, ...)

mixed[] array_pad(
        mixed[] $input,
        int $pad_size,
        mixed $pad_value)

mixed array_pop(
        mixed[] $stack)

int array_push(
        mixed[] $stack,
        mixed $var_, ...)

mixed array_rand(
        mixed[] $input, ...)

mixed array_reduce(
        mixed[] $input,
        mixed $string_, ...)

mixed[] array_reverse(
        mixed[] $input, ...)

mixed array_shift(
        mixed[] $a)

mixed[] array_slice(
        mixed[] $input,
        int $offset, ...)

mixed[] array_splice(
        mixed[] $input,
        int $offset, ...)

mixed array_sum(
        mixed[] $input)

mixed[] array_udiff(
        mixed[] $arr1,
        mixed[] $arr2, ...)

mixed[] array_udiff_assoc(
        mixed[] $arr1,
        mixed[] $arr2, ...)

mixed[] array_udiff_uassoc(
        mixed[] $arr1,
        mixed[] $arr2, ...)

mixed[] array_uintersect(
        mixed[] $arr1,
        mixed[] $arr2, ...)

mixed[] array_uintersect_assoc(
        mixed[] $arr1,
        mixed[] $arr2, ...)

mixed[] array_uintersect_uassoc(
        mixed[] $arr1,
        mixed[] $arr2, ...)

mixed[] array_unique(
        mixed[] $input)

int array_unshift(
        mixed[] $stack,
        mixed $var_, ...)

mixed[] array_values(
        mixed[] $input)

int assert(...)

mixed assert_options(
        int $what, ...)

int version_compare(
        string $ver1,
        string $ver2, ...)

int ftok(
        string $pathname,
        string $proj)

string str_rot13(
        string $str)

boolean output_add_rewrite_var(
        string $name,
        string $value)

boolean output_reset_rewrite_vars()

mixed date_sunrise(
        mixed $time, ...)

mixed date_sunset(
        mixed $time, ...)

int strlen(
        string $s)

int strcmp(
        string $a,
        string $b)

boolean ctype_cntrl(
        string $text)

int func_num_args()

mixed func_get_arg(
        int $n)

mixed[int] func_get_args()

mixed[] each(
        mixed[] $a)

boolean empty(
        mixed $variable)

void unset(
        mixed $var_, ...)


mixed eval(
        string $cmd)

Deprecated: the contents of the eval() cannot be parsed by PHPLint.


boolean defined(
        string $c)

boolean headers_sent(
        return string & $file = "",
        return int & $line = 0)

boolean header_register_callback(
        mixed $callback)

int http_response_code(
        int $response_code = 0)

mixed set_error_handler(
        mixed $cb, ...)

int error_reporting(...)

boolean function_exists(
        string $func_name)

boolean method_exists(
        mixed $obj,
        string $method)

string get_class(
        object $obj = NULL)

string zend_version()

boolean is_subclass_of(
        mixed $obj,
        string $class_name)

boolean my_drawtext(
        resource $image,
        string $text,
        resource $font,
        int $x,
        int $y, ...)

int strncmp(
        string $str1,
        string $str2,
        int $len)

int strncasecmp(
        string $str1,
        string $str2,
        int $len)

string get_parent_class(
        mixed $object_ = NULL)

boolean is_a(
        object $object_,
        string $class_name)

mixed[string] get_class_vars(
        string $class_name)

mixed[string] get_object_vars(
        object $obj)

string[int] get_class_methods(
        mixed $class_)

boolean class_exists(
        string $classname,
        boolean $autoload = TRUE)

boolean interface_exists(
        string $classname,
        boolean $autoload = TRUE)

void leak(
        int $num_bytes = 3)

string[int] get_included_files()

void restore_error_handler()

string[int] get_declared_classes()

string[int] get_declared_interfaces()

string[string][int] get_defined_functions()

mixed[string] get_defined_vars()

string create_function(
        string $args_,
        string $code)

string get_resource_type(
        resource $res)

string[int] get_loaded_extensions()

mixed[string] get_defined_constants()

void debug_print_backtrace(
        int $options = 0,
        int $limit = 0)

mixed[int][string] debug_backtrace(
        int $options = 1,
        int $limit = 0)

boolean extension_loaded(
        string $extension_name)

string[int] get_extension_funcs(
        string $extension_name)

string confirm_extname_compiled(
        string $arg)

int memory_get_usage()

string uuencode(
        string $data)

string uudecode(
        string $data)

string php_real_logo_guid()

string php_egg_logo_guid()

string image_type_to_extension(
        int $imagetype, ...)

string image_type_to_mime_type(
        int $imgtype)

string[] get_headers(
        string $url,
        int $format = 0)

triggers E_WARNING

mixed[string] error_get_last()

boolean time_sleep_until(
        float $timestamp)

triggers E_WARNING

mixed[] array_fill_keys(
        mixed[] $keys,
        mixed $value)

mixed[] array_intersect_key(
        mixed[] $array1,
        mixed[] $array2, ...)

mixed[] array_intersect_ukey(
        mixed[] $array1,
        mixed[] $array2, ...)

mixed[] array_diff_ukey(
        mixed[] $array1,
        mixed[] $array2, ...)

float array_product(
        mixed[] $array_)

int memory_get_peak_usage(...)

string set_exception_handler(
        mixed $exception_handler)

void restore_exception_handler()

string sys_get_temp_dir()

boolean property_exists(
        mixed $class_,
        string $property)

DateTime date_create(...)

void date_date_set(
        DateTime $obj,
        int $year,
        int $month,
        int $day)

string date_default_timezone_get()

boolean date_default_timezone_set(
        string $timezone_identifier)

string date_format(
        DateTime $obj,
        string $format)

void date_isodate_set(
        DateTime $obj,
        int $year,
        int $week, ...)

void date_modify(
        DateTime $obj,
        string $modify)

int date_offset_get(
        DateTime $obj)

mixed[string] date_parse(
        string $date)

string[string] date_sun_info(
        int $time,
        float $latitude,
        float $longitude)

void date_time_set(
        DateTime $obj,
        int $hour,
        int $minute, ...)

DateTimeZone date_timezone_get(
        DateTime $obj)

void date_timezone_set(
        DateTime $obj,
        DateTimeZone $tz)

mixed[] timezone_abbreviations_list()

string[int] timezone_identifiers_list()

string timezone_name_from_abbr(
        string $abbr, ...)

string timezone_name_get(
        DateTimeZone $obj)

int timezone_offset_get(
        DateTimeZone $tz,
        DateTime $date)

DateTimeZone timezone_open(
        string $timezone)

mixed[string][string] timezone_transitions_get(
        DateTimeZone $tz)

void gc_collect_cycles()

boolean gc_enabled()

void gc_enable()

void gc_disable()

boolean class_alias(...)

string get_called_class()

string[int] str_getcsv(
        string $input, ...)

string lcfirst(
        string $str)

mixed[] array_replace(
        mixed[] $arr,
        mixed[] $arr1, ...)

mixed[] array_replace_recursive(
        mixed[] $arr,
        mixed[] $arr1, ...)

DateTime date_add(
        DateTime $dt,
        DateInterval $interval)

DateTime date_sub(
        DateTime $dt,
        DateInterval $interval)

mixed[string] date_parse_from_format(
        string $format,
        string $date)

string timezone_version_get()

mixed[] parse_ini_string(
        string $ini,
        boolean $process_sections = FALSE,
        int $scanner_mode = 1)


class Directory

{

string $path

resource $hanlde

string read()

void rewind()

void close()

}

class stdClass

{

}

class __PHP_Incomplete_Class_Name

Trying to retrieve an object from $_SESSION[] whose class is undefined we ends with an instance of this dummy class

Original properties are restored, but the original class name and the methods do not, so the class is unusable. Trying to call any method on this class causes these messages:

PHP Notice: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "MyClass" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /home/www.icosaedro.it/public_html/mypage.html on line 34

PHP Fatal error: main(): The script tried to execute a method or access a property of an incomplete object. [again, same hint]


{

}

class php_user_filter

{

}

class Exception

{


protected string $message = ""

Exception message


protected int $code = 0

User defined exception code


protected string $file

Source filename of exception


protected int $line = 0

Source line of exception


void __construct(
        string $message = "",
        int $code = 0,
        Exception $previous = NULL)

final string getMessage()

Message of exception


final Exception getPrevious()

Return previous exception, or NULL if there is not


final int getCode()

Code of exception


final string getFile()

Source filename


final int getLine()

Source line


final mixed[int][string] getTrace()

An array of the backtrace()


final string getTraceAsString()

Formatted string of trace


string __toString()

Formatted string for display


final void __clone()

Always gives a fatal error: exceptions are not clonable.

FIXME: this method is `private' in official manual: why?


}

class ErrorException
      |  
      `--Exception

Generic exception into which errors can be mapped


{

protected int $severity = 0

protected string $message = ""
inherited from Exception

protected int $code = 0
inherited from Exception

protected string $file
inherited from Exception

protected int $line = 0
inherited from Exception


void __construct(
        string $message = "",
        int $code = 0,
        int $severity = 1,
        string $filename = NULL,
        int $lineno = 0)

Encapsulate errors in exceptions

$message is the human-readable description of the exception, while $code lets the program to detect the specific condition occurred. The $severity is the usual log level (see the E_* constants). $filename and $lineno lets to indicate an alternate position; customized error handling functions can indicate the real source of the error rather that the point where the exception was thrown.


int getSeverity()

final string getMessage()
inherited from Exception

final Exception getPrevious()
inherited from Exception

final int getCode()
inherited from Exception

final string getFile()
inherited from Exception

final int getLine()
inherited from Exception

final mixed[int][string] getTrace()
inherited from Exception

final string getTraceAsString()
inherited from Exception

string __toString()
inherited from Exception

final void __clone()
inherited from Exception

}

class DateTime

See: http://www.php.net/manual/en/ref.datetime.php


{

ATOM = "Y-m-d\\TH:i:sP"

COOKIE = "l, d-M-y H:i:s T"

ISO8601 = "Y-m-d\\TH:i:sO"

RFC822 = "D, d M y H:i:s O"

RFC850 = "l, d-M-y H:i:s T"

RFC1036 = "D, d M y H:i:s O"

RFC1123 = "D, d M Y H:i:s O"

RFC2822 = "D, d M Y H:i:s O"

RFC3339 = "Y-m-d\\TH:i:sP"

RSS = "D, d M Y H:i:s O"

W3C = "Y-m-d\\TH:i:sP"

void __construct(
        string $time = "now",
        DateTimeZone $timezone = NULL)

throws Exception

void setDate(
        int $year,
        int $month,
        int $day)

string format(
        string $format)

void setISODate(
        int $year,
        int $week, ...)

void modify(
        string $modify)

int getOffset()

void setTime(
        int $hour,
        int $minute, ...)

DateTimeZone getTimezone()

void setTimezone(
        DateTimeZone $tz)

DateTime add(
        DateInterval $interval)

DateTime sub(
        DateInterval $interval)

DateInterval diff(
        DateTime $datetime, ...)

static DateTime createFromFormat(
        string $format,
        string $time, ...)

static mixed[string] getLastErrors()

int getTimestamp()

DateTime setTimestamp(
        int $unixtimestamp)

}

class DateTimeZone

See: http://www.php.net/manual/en/ref.datetime.php


{

AFRICA = 1

AMERICA = 2

ANTARCTICA = 4

ARCTIC = 8

ASIA = 16

ATLANTIC = 32

AUSTRALIA = 64

EUROPE = 128

INDIAN = 256

PACIFIC = 512

UTC = 1024

ALL = 2047

ALL_WITH_BC = 4095

PER_COUNTRY = 4096

static mixed[] listAbbreviations()

static string[int] listIdentifiers(
        int $what = 2047,
        string $country = NULL)

static string getName()

static int getOffset(
        DateTime $datetime)

void __construct(
        string $timezone)

mixed[string][string] getTransitions()

}

class DateInterval

{

void __construct(
        string $interval_spec)

static DateInterval createFromDateString(
        string $time)

string format(
        string $format)

}

class DatePeriod

{

EXCLUDE_START_DATE = 1

void __construct(
        DateTime $start,
        DateInterval $interval,
        int $recurrences, ...)

}


Generated by PHPLint Documentator