ocPortal Developer's Guide: PHP Reference
» Return to ContentsThe code quality checker relies on a specific PHP API subset, to ensure compatibility. This subset is documented here.
sources/phpstub.php
Global_functions_phpstub.php
Function summary
| array | debug_backtrace () |
| mixed | abs (mixed number) |
| array | array_count_values (array input) |
| array | array_diff (array array1, array array2, ?array array3) |
| array | array_flip (array trans) |
| boolean | array_key_exists (mixed key, array search) |
| array | array_keys (array input, ?mixed search_value) |
| array | array_intersect (array array1, array array2, ?array array3) |
| array | array_merge (array array1, array array2, ?array array3, ?array array4, ?array array5) |
| ?mixed | array_pop (array array) |
| integer | array_push (array array, mixed var) |
| array | array_reverse (array array, boolean preserve_keys) |
| mixed | array_search (mixed needle, array haystack) |
| ?mixed | array_shift (array array) |
| array | array_slice (array array, integer offset, ?integer length) |
| array | array_splice (array input, integer offset, ?integer length, ?array replacement) |
| array | array_unique (array array) |
| array | array_values (array array) |
| void | arsort (array array, integer sort_flags) |
| void | asort (array array, integer sort_flags) |
| ~string | base64_decode (string encoded_data) |
| string | base64_encode (string data) |
| mixed | call_user_func (mixed function, ?mixed param_a, ?mixed param_b, ?mixed param_c) |
| float | ceil (float function) |
| boolean | chdir (PATH directory) |
| boolean | checkdate (integer month, integer day, integer year) |
| boolean | chmod (PATH filename, integer mode) |
| string | chr (integer ascii) |
| string | chunk_split (string body, integer chunklen, string splitter) |
| boolean | class_exists (string class_name) |
| void | clearstatcache () |
| void | closedir (resource handle) |
| mixed | constant (string name) |
| boolean | copy (PATH source, PATH dest) |
| float | cos (float angle) |
| integer | count (array var) |
| string | crypt (string string, ?string salt) |
| mixed | current (array array) |
| string | date (string format, ?TIME timestamp) |
| ~object | dbx_connect (string module, string server, string database, string username, string password, BINARY persistent) |
| string | dbx_escape_string (object connection, string unescaped_string) |
| ~resource | dbx_query (object connection, string query, integer flags) |
| string | dechex (integer number) |
| string | decoct (integer number) |
| boolean | define (string name, mixed value) |
| boolean | defined (string name) |
| PATH | dirname (PATH name) |
| ~integer | disk_free_space (PATH directory) |
| float | deg2rad (float number) |
| boolean | error_log (string message, integer message_type, string destination) |
| integer | error_reporting (?integer level) |
| string | exec (PATH command, ?array output, ?integer return_val) |
| void | exit (string message) |
| array | explode (string separator, string string, ?integer limit) |
| boolean | fclose (resource handle) |
| boolean | feof (resource handle) |
| string | fgets (resource handle, integer length) |
| ~array | file (PATH filename) |
| boolean | file_exists (PATH filename) |
| ~TIME | filectime (PATH filename) |
| ~integer | filegroup (PATH filename) |
| ~TIME | filemtime (PATH filename) |
| ~integer | fileowner (PATH filename) |
| ~integer | fileperms (PATH filename) |
| ~integer | filesize (PATH filename) |
| float | floatval (mixed var) |
| float | floor (float value) |
| array | get_defined_vars () |
| array | get_declared_classes () |
| array | get_defined_functions () |
| ~resource | fopen (PATH filename, string mode) |
| ~integer | fpassthru (resource handle) |
| string | fread (resource handle, integer length) |
| integer | fseek (resource handle, integer offset, integer whence) |
| ~resource | fsockopen (string target, integer port, integer errno, string errstr, ?float timeout) |
| ~integer | ftell (resource handle) |
| boolean | ftp_chdir (resource ftp_stream, PATH dir) |
| boolean | ftp_close (resource ftp_stream) |
| ~resource | ftp_connect (string host, integer port, integer timeout) |
| boolean | ftp_delete (resource ftp_stream, PATH filename) |
| boolean | ftp_fput (resource ftp_stream, PATH remote_file, resource handle, integer mode) |
| boolean | ftp_login (resource ftp_stream, string username, string password) |
| ~string | ftp_mkdir (resource ftp_stream, PATH directory) |
| ~array | ftp_nlist (resource ftp_stream, PATH directory) |
| boolean | ftp_put (resource ftp_stream, PATH remote_file, PATH local_file, integer mode) |
| boolean | ftp_rename (resource ftp_stream, PATH from, PATH to) |
| boolean | ftp_rmdir (resource ftp_stream, PATH directory) |
| boolean | ftp_site (resource ftp_stream, string cmd) |
| ~integer | ftp_size (resource ftp_stream, PATH cmd) |
| boolean | function_exists (string function_name) |
| ~integer | fwrite (resource handle, string string, ?integer length) |
| array | gd_info () |
| string | get_class (object obj) |
| array | get_html_translation_table (integer table, integer quote_style) |
| boolean | get_magic_quotes_gpc () |
| PATH | getcwd () |
| array | getdate (?TIME timestamp) |
| ~string | getenv (string string) |
| string | gmdate (string format, ?TIME timestamp) |
| boolean | gzclose (resource handle) |
| ~resource | gzopen (PATH filename, string mode) |
| ~integer | gzwrite (resource handle, string string, ?integer length) |
| void | header (string string, boolean replace_last) |
| boolean | headers_sent () |
| integer | hexdec (string hex_string) |
| string | htmlentities (string string, integer quote_style, string charset) |
| boolean | imagealphablending (resource image, boolean blendmode) |
| integer | imagecolorallocate (resource image, integer red, integer green, integer blue) |
| integer | imagecolortransparent (resource image, ?integer color) |
| void | imagecopy (resource dst_im, resource src_im, integer dst_x, integer dst_y, integer src_x, integer src_y, integer src_w, integer src_h) |
| boolean | imagecopyresampled (resource dst_im, resource src_im, integer dst_x, integer dst_y, integer src_x, integer src_y, integer dst_w, integer dst_h, integer src_w, integer src_h) |
| void | imagecopyresized (resource dst_im, resource src_im, integer dst_x, integer dst_y, integer src_x, integer src_y, integer dst_w, integer dst_h, integer src_w, integer src_h) |
| resource | imagecreate (integer width, integer height) |
| ~resource | imagecreatefromstring (string image) |
| ~resource | imagecreatefrompng (PATH path) |
| ~resource | imagecreatefromjpeg (PATH path) |
| resource | imagecreatetruecolor (integer x, integer y) |
| integer | imagecolorat (resource image, integer x, integer y) |
| array | imagecolorsforindex (resource image, integer color) |
| void | imagedestroy (resource image) |
| void | imagefill (resource image, integer x, integer y, integer colour) |
| integer | imagefontheight (integer font) |
| integer | imagefontwidth (integer font) |
| boolean | imagejpeg (resource image, ?string filename, ?integer quality) |
| boolean | imagepng (resource image, ?string filename) |
| void | imagesavealpha (resource image, boolean saveflag) |
| void | imagesetpixel (resource image, integer x, integer y, integer color) |
| void | imagestring (resource image, integer font, integer x, integer y, string s, integer col) |
| integer | imagesx (resource image) |
| integer | imagesy (resource image) |
| void | imagestringup (resource image, integer font, integer x, integer y, string s, integer col) |
| ~array | imagettfbbox (float size, float angle, string fontfile, string text) |
| ~array | imagettftext (resource handle, float size, float angle, integer x, integer y, integer colour, string fontfile, string text) |
| integer | imagetypes () |
| boolean | imagearc (resource image, integer cx, integer cy, integer w, integer h, integer s, integer e, integer color) |
| boolean | imagefilledarc (resource image, integer cx, integer cy, integer w, integer h, integer s, integer e, integer color, integer style) |
| void | imagecopymergegray (resource dst_im, resource src_im, integer dst_x, integer dst_y, integer src_x, integer src_y, integer src_w, integer src_h, integer pct) |
| void | imageline (resource image, integer x1, integer y1, integer x2, integer y2, integer color) |
| boolean | imageellipse (resource image, integer cx, integer cy, integer w, integer h, integer color) |
| boolean | imagefilledellipse (resource image, integer cx, integer cy, integer w, integer h, integer color) |
| void | imagechar (resource image, integer font, integer x, integer y, string c, integer color) |
| void | imagefilledpolygon (resource image, array points, integer num_points, integer colour) |
| void | imagepolygon (resource image, array points, integer num_points, integer colour) |
| void | imagefilledrectangle (resource image, integer x1, integer y1, integer x2, integer y2, integer col) |
| void | imagerectangle (resource image, integer x1, integer y1, integer x2, integer y2, integer col) |
| void | imagefilltoborder (resource image, integer x, integer y, integer border, integer color) |
| void | imagegammacorrect (resource image, float in, float out) |
| boolean | imageinterlace (resource image, BINARY interlace) |
| ~integer | imageloadfont (PATH file) |
| void | imagepalettecopy (resource destination, resource source) |
| boolean | imagesetbrush (resource image, resource brush) |
| void | imagesetstyle (resource image, integer style) |
| boolean | imagesetthickness (resource image, integer thickness) |
| boolean | imagesettile (resource image, resource tile) |
| void | imagetruecolortopalette (resource image, boolean dither, integer ncolors) |
| void | imagecharup (resource image, integer font, integer x, integer y, string c, integer color) |
| integer | imagecolorclosest (resource image, integer red, integer green, integer blue) |
| integer | imagecolorclosestalpha (resource image, integer red, integer green, integer blue, integer alpha) |
| integer | imagecolorclosesthwb (resource image, integer red, integer green, integer blue) |
| boolean | imagecolordeallocate (resource image, integer colour) |
| integer | imagecolorexact (resource image, integer red, integer green, integer blue) |
| ~integer | imagecolorexactalpha (resource image, integer red, integer green, integer blue, integer alpha) |
| integer | imagecolorresolve (resource image, integer red, integer green, integer blue) |
| ~integer | imagecolorresolvealpha (resource image, integer red, integer green, integer blue, integer alpha) |
| void | imagecolorset (resource image, integer red, integer green, integer blue) |
| integer | imagecolorstotal (resource image) |
| void | imagecopymerge (resource dst_im, resource src_im, integer dst_x, integer dst_y, integer src_x, integer src_y, integer src_w, integer src_h, integer pct) |
| string | implode (string glue, array pieces) |
| boolean | in_array (mixed needle, array haystack) |
| mixed | include (PATH filename) |
| mixed | include_once (PATH filename) |
| mixed | ini_get (string varname) |
| ~string | ini_set (string var, string value) |
| integer | intval (mixed var, integer base) |
| boolean | is_a (object object, string class_name) |
| boolean | is_array (mixed var) |
| boolean | is_bool (mixed var) |
| boolean | is_dir (PATH path) |
| boolean | is_file (PATH path) |
| boolean | is_link (PATH path) |
| boolean | is_float (mixed var) |
| boolean | is_integer (mixed var) |
| boolean | is_callable (mixed var) |
| boolean | is_null (mixed var) |
| boolean | is_numeric (mixed var) |
| boolean | is_object (mixed var) |
| boolean | is_readable (PATH path) |
| boolean | is_resource (mixed var) |
| boolean | is_string (mixed var) |
| boolean | is_uploaded_file (PATH path) |
| boolean | is_writable (PATH path) |
| boolean | isset (mixed path) |
| void | krsort (array array) |
| void | ksort (array array) |
| string | ltrim (string string, string characters) |
| boolean | mail (string to, string subject, string message, string additional_headers, string additional_flags) |
| mixed | max (mixed arg1, ?mixed arg2, ?mixed arg3, ?mixed arg4, ?mixed arg5, ?mixed arg6, ?mixed arg7, ?mixed arg8, ?mixed arg9, ?mixed arg10) |
| string | md5 (string str) |
| boolean | method_exists (object object, string method_name) |
| string | microtime (boolean as_float) |
| mixed | min (mixed arg1, ?mixed arg2, ?mixed arg3, ?mixed arg4, ?mixed arg5, ?mixed arg6, ?mixed arg7, ?mixed arg8, ?mixed arg9, ?mixed arg10) |
| boolean | mkdir (PATH path, integer mode) |
| TIME | mktime (integer hour, integer minute, integer second, ?integer month, ?integer day, ?integer year, integer is_dst) |
| boolean | move_uploaded_file (PATH filename, PATH destination) |
| integer | mt_getrandmax () |
| integer | mt_rand (integer min, integer max) |
| void | mt_srand (integer seed) |
| string | number_format (mixed number, integer decimals, string dec_point, string thousands_sep) |
| boolean | ob_end_clean () |
| boolean | ob_end_flush () |
| ~string | ob_get_contents () |
| ~string | ob_get_clean () |
| boolean | ob_start () |
| integer | print (string octal_string) |
| integer | octdec (string octal_string) |
| ~resource | opendir (PATH path) |
| integer | ord (string string) |
| string | pack (string format, ?mixed arg1, ?mixed arg2, ?mixed arg3, ?mixed arg4, ?mixed arg5, ?mixed arg6, ?mixed arg7, ?mixed arg8, ?mixed arg9, ?mixed arg10, ?mixed arg11, ?mixed arg12, ?mixed arg13, ?mixed arg14, ?mixed arg15, ?mixed arg16, ?mixed arg17, ?mixed arg18, ?mixed arg19, ?mixed arg20, ?mixed arg21, ?mixed arg22, ?mixed arg23, ?mixed arg24, ?mixed arg25, ?mixed arg26, ?mixed arg27, ?mixed arg28, ?mixed arg29, ?mixed arg30) |
| ~array | parse_url (string url) |
| ~array | pathinfo (PATH path) |
| void | phpinfo () |
| string | phpversion () |
| ~array | posix_getpwuid (integer uid) |
| integer | posix_getuid () |
| ~integer | preg_match (string pattern, string subject, ?array matches, integer flags) |
| array | preg_grep (string pattern, array subject, integer flags) |
| ~integer | preg_match_all (string pattern, string subject, array matches, integer flags) |
| ~string | preg_replace (mixed pattern, mixed replacement, string subject, ?integer limit) |
| ~string | preg_replace_callback (string pattern, mixed callback, string subject, ?integer limit) |
| array | preg_split (string pattern, string subject, ?integer max_splits, ?integer mode) |
| void | print_r (mixed data) |
| boolean | putenv (string string) |
| string | rawurldecode (string str) |
| string | rawurlencode (string str) |
| ~string | readdir (resource dir_handle) |
| PATH | realpath (PATH path) |
| void | register_shutdown_function (mixed callback, ?mixed parama, ?mixed paramb, ?mixed paramc, ?mixed paramd, ?mixed parame, ?mixed paramf, ?mixed paramg, ?mixed paramh, ?mixed parami, ?mixed paramj, ?mixed paramk) |
| boolean | rename (PATH oldname, PATH newname) |
| mixed | require (PATH filename) |
| mixed | require_once (PATH filename) |
| mixed | reset (array array) |
| boolean | rmdir (PATH dirname) |
| float | round (float val, integer precision) |
| void | rsort (array array) |
| string | rtrim (string str, string characters) |
| string | serialize (mixed value) |
| mixed | set_error_handler (mixed error_handler) |
| boolean | setcookie (string name, ?string value, ?integer expire, ?string path, ?string domain, BINARY secure) |
| ~string | shell_exec (string command) |
| string | escapeshellcmd (string arg) |
| string | escapeshellarg (string arg) |
| float | sin (float arg) |
| void | sort (array array) |
| string | sprintf (string format, ?mixed arg1, ?mixed arg2, ?mixed arg3, ?mixed arg4, ?mixed arg5, ?mixed arg6, ?mixed arg7, ?mixed arg8) |
| void | srand (integer seed) |
| string | str_pad (string input, integer pad_length, string pad_string, integer pad_type) |
| string | str_repeat (string input, integer multiplier) |
| mixed | str_replace (mixed search, mixed replace, mixed subject) |
| integer | strcmp (string str1, string str2) |
| string | strftime (string format, ?TIME timestamp) |
| string | strip_tags (string str, string allowable_tags) |
| string | addslashes (string str) |
| string | stripslashes (string str) |
| integer | strlen (string str) |
| ~integer | strpos (string haystack, string needle, integer offset) |
| ~integer | strrpos (string haystack, string needle) |
| ~string | strstr (string haystack, string needle) |
| ~string | strtok (string subject, ?string deliminators) |
| string | strtolower (string str) |
| TIME | strtotime (string time, ?TIME now) |
| string | strtoupper (string str) |
| string | strtr (string string, mixed replace_pairs, ?mixed to) |
| string | strval (mixed var) |
| ~string | substr (string string, integer start, ?integer length) |
| integer | substr_count (string haystack, string needle) |
| ~string | tempnam (PATH dir, string prefix) |
| TIME | time () |
| string | trim (string str, string characters) |
| void | trigger_error (string error_msg, integer error_type) |
| void | uasort (array array, mixed cmp_function) |
| string | ucfirst (string str) |
| string | ucwords (string str) |
| void | uksort (array array, mixed cmp_function) |
| string | uniqid (string prefix, boolean lcg) |
| boolean | unlink (PATH filename) |
| ~mixed | unserialize (string str) |
| void | unset (mixed var) |
| string | urldecode (string str) |
| string | urlencode (string str) |
| void | usort (array array, mixed cmp_function) |
| string | utf8_decode (string data) |
| string | utf8_encode (string data) |
| string | wordwrap (string string, integer width, string break, boolean cut) |
| void | xdebug_dump_function_profile (integer type) |
| void | xdebug_start_profiling () |
| string | xml_error_string (integer code) |
| ~integer | xml_get_current_byte_index (resource parser) |
| ~integer | xml_get_current_line_number (resource parser) |
| integer | xml_get_error_code (resource parser) |
| BINARY | xml_parse (resource parser, string data, boolean is_final) |
| boolean | xml_parser_free (resource parser) |
| boolean | xml_parser_set_option (resource parser, integer option, mixed value) |
| boolean | xml_set_character_data_handler (resource parser, mixed handler) |
| boolean | xml_set_element_handler (resource parser, mixed start_handler, mixed end_handler) |
| void | xml_set_object (resource parser, object object) |
| string | xmlrpc_encode_request (string method, array params) |
| float | acos (float arg) |
| mixed | array_rand (array input, integer num_req) |
| void | array_unshift (array array, mixed var) |
| float | asin (float arg) |
| float | atan (float num) |
| string | base_convert (string number, integer frombase, integer tobase) |
| string | basename (PATH path, string ext) |
| integer | bindec (string binary_string) |
| mixed | call_user_func_array (mixed callback, array parameters) |
| integer | crc32 (string str) |
| string | decbin (integer number) |
| array | each (array array) |
| boolean | empty (mixed var) |
| mixed | end (array array) |
| boolean | fflush (resource handle) |
| ~TIME | fileatime (PATH filename) |
| boolean | flock (resource handle, integer operation) |
| void | flush () |
| string | get_current_user () |
| string | gethostbyaddr (string ip_address) |
| string | gethostbyname (string hostname) |
| integer | getrandmax () |
| integer | gmmktime (integer hour, integer minute, integer second, integer month, integer day, integer year, integer is_dst) |
| string | gmstrftime (string format, ?TIME timestamp) |
| ~integer | ip2long (string ip_address) |
| mixed | key (array array) |
| float | log (float arg) |
| float | log10 (float arg) |
| integer | long2ip (string proper_address) |
| mixed | next (array array) |
| float | pi () |
| float | pow (float base, float exp) |
| string | preg_quote (string str) |
| mixed | prev (array array) |
| float | rad2deg (float number) |
| array | range (mixed from, mixed to, integer step) |
| ~integer | readfile (PATH filename) |
| void | shuffle (array array) |
| integer | similar_text (string first, string second, ?float percent) |
| float | sqrt (float arg) |
| integer | strcasecmp (string str1, string str2) |
| integer | strcoll (string str1, string str2) |
| integer | strcspn (string str1, string str2) |
| string | stristr (string haystack, string needle) |
| integer | strnatcasecmp (string str1, string str2) |
| integer | strnatcmp (string str1, string str2) |
| integer | strncasecmp (string str1, string str2, integer len) |
| integer | strncmp (string str1, string str2, integer len) |
| string | strrchr (string haystack, string needle) |
| string | strrev (string string) |
| string | strspn (string string, string mask) |
| string | substr_replace (string string, string replacement, integer start, ?integer length) |
| float | tan (float arg) |
| ~array | unpack (string format, string data) |
| mixed | version_compare (string version1, string version2, ?string compare_symbol) |
| string | gettype (mixed var) |
| string | zend_version () |
| ~integer | xml_get_current_column_number (resource parser) |
| ~resource | xml_parser_create (?string encoding) |
| mixed | xml_parser_get_option (resource parser, integer option) |
| BINARY | xml_parse_into_struct (resource parser, string data, array values, ?array index) |
| boolean | xml_set_default_handler (resource parser, mixed callback) |
| boolean | xml_set_external_entity_ref_handler (resource parser, mixed callback) |
| boolean | xml_set_notation_decl_handler (resource parser, mixed callback) |
| boolean | xml_set_processing_instruction_handler (resource parser, mixed callback) |
| boolean | xml_set_unparsed_entity_decl_handler (resource parser, mixed callback) |
| void | var_dump (mixed expression) |
| integer | vprintf (string format, array args) |
| string | vsprintf (string format, array args) |
| boolean | touch (PATH filename, ?TIME time, ?TIME atime) |
| float | tanh (float in) |
| float | sinh (float in) |
| void | sleep (integer sec) |
| string | soundex (string input) |
| string | stripcslashes (string in) |
| ~string | system (string commend, ?integer ret_var) |
| ~integer | readgzfile (PATH filename) |
| void | restore_error_handler () |
| boolean | rewind (resource handle) |
| void | rewinddir (resource handle) |
| string | quoted_printable_decode (string in) |
| string | quotemeta (string in) |
| float | exp (float arg) |
| float | lcg_value () |
| array | localtime (?TIME timestamp, boolean associative) |
| string | addcslashes (string str, string charlist) |
| array | array_filter (array input, ?mixed callback) |
| array | array_map (mixed callback, array array) |
| mixed | array_sum (array array) |
| array | array_merge_recursive (array array1, array array2, ?array array3, ?array array4, ?array array5) |
| array | array_pad (array input, integer pad_size, mixed pad_value) |
| ?integer | array_reduce (array input, mixed callback, ?integer initial) |
| boolean | array_walk (array array) |
| float | atan2 (float x, float y) |
| ~string | fgetc (resource handle) |
| ~array | fgetcsv (resource handle, integer length, string delimiter) |
| ~string | fgetss (resource handle, integer length, string allowable_tags) |
| ~string | filetype (PATH file) |
| array | fscanf (resource handle, string format) |
| array | fstat (resource handle) |
| boolean | ftp_cdup (resource ftp_stream) |
| boolean | ftp_fget (resource ftp_stream, resource file_handle, PATH remote_file, integer mode) |
| boolean | ftp_get (resource ftp_stream, PATH local_file, PATH remote_file, integer mode) |
| boolean | ftp_pasv (resource ftp_stream, boolean pasv) |
| ~string | ftp_pwd (resource ftp_stream) |
| ~array | ftp_rawlist (resource ftp_stream, PATH directory) |
| ~string | ftp_systype (resource ftp_stream) |
| boolean | ftruncate (resource file, integer size) |
| mixed | func_get_arg (integer arg_num) |
| array | func_get_args () |
| integer | func_num_args () |
| ~array | parse_ini_file (PATH filename, boolean process_sections) |
| void | parse_str (string str, array arr) |
| void | passthru (PATH command, ?integer return_var) |
| integer | pclose (resource handle) |
| boolean | is_executable (PATH filename) |
| boolean | is_scalar (mixed var) |
| boolean | is_subclass_of (mixed object, string class_name) |
| boolean | natcasesort (array array) |
| boolean | natsort (array array) |
| string | nl2br (string in) |
| ~integer | ob_get_length () |
| string | ob_gzhandler (string buffer, integer mode) |
| string | ob_iconv_handler (string buffer, integer mode) |
| void | ob_implicit_flush (integer flag) |
| string | php_sapi_name () |
| ~resource | popen (string command, string mode) |
| string | printf (string format, ?mixed arg1, ?mixed arg2, ?mixed arg3, ?mixed arg4, ?mixed arg5) |
| float | cosh (float arg) |
| mixed | count_chars (string string, integer mode) |
| ~integer | disk_total_space (PATH directory) |
| mixed | eval (string code) |
| float | doubleval (mixed var) |
| ~array | gethostbynamel (string hostname) |
| ~array | getimagesize (PATH filename, ?array image_info) |
| ~integer | getmypid () |
| ~integer | getmyuid () |
| array | gettimeofday () |
| boolean | get_magic_quotes_runtime () |
| string | get_parent_class (object object) |
| array | get_included_files () |
| string | get_resource_type (resource handle) |
| string | gzcompress (string data, integer level) |
| ~string | gzdeflate (string data, integer level) |
| string | gzencode (string data, integer level) |
| ~array | gzfile (PATH filename) |
| string | gzinflate (string data, integer length) |
| string | gzuncompress (string data, integer length) |
| float | hypot (float x, float y) |
| boolean | ignore_user_abort (boolean setting) |
| string | session_cache_limiter (?string cache_limiter) |
| boolean | session_decode (string data) |
| void | session_destroy () |
| string | session_encode () |
| array | session_get_cookie_params () |
| string | session_id (?string id) |
| string | session_module_name (?string name) |
| string | session_name (?string name) |
| string | session_save_path (?PATH path) |
| void | session_set_cookie_params (integer lifetime, ?string path, ?string domain) |
| boolean | session_set_save_handler (mixed open, mixed close, mixed read, mixed write, mixed destroy, mixed gc) |
| boolean | session_start () |
| boolean | session_unset (boolean foo) |
| void | session_write_close () |
| void | ocp_mark_as_escaped (string var) |
| boolean | ocp_is_escaped (string var) |
array debug_backtrace()
Generate a stack trace.
Parameters…
Returns…
| Description | Stack trace. |
|---|---|
| Type | array |
mixed abs(mixed number)
Absolute value.
Parameters…
| Name | number |
|---|---|
| Description | The number to get the absolute value of. |
| Type | mixed |
Returns…
| Description | The absolute value of number. |
|---|---|
| Type | mixed |
array array_count_values(array input)
Counts all the values of an array.
Parameters…
| Name | input |
|---|---|
| Description | Input array. |
| Type | array |
Returns…
| Description | An array using the values of the input array as keys and their frequency in input as values. |
|---|---|
| Type | array |
array array_diff(array array1, array array2, ?array array3)
Calculate the difference between arrays.
Parameters…
| Name | array1 |
|---|---|
| Description | First array. |
| Type | array |
| Name | array2 |
|---|---|
| Description | Second array. |
| Type | array |
| Name | array3 |
|---|---|
| Description | Third array (NULL: only 2). |
| Default value | |
| Type | ?array |
Returns…
| Description | The difference. |
|---|---|
| Type | array |
array array_flip(array trans)
Exchanges all keys with their associated values in an array.
Parameters…
| Name | trans |
|---|---|
| Description | Array to flip. |
| Type | array |
Returns…
| Description | An array in flip order. |
|---|---|
| Type | array |
boolean array_key_exists(mixed key, array search)
Checks if the given key or index exists in the array.
Parameters…
| Name | key |
|---|---|
| Description | Key. |
| Type | mixed |
| Name | search |
|---|---|
| Description | Search array. |
| Type | array |
Returns…
| Description | Whether the key is set in the search array. |
|---|---|
| Type | boolean |
array array_keys(array input, ?mixed search_value)
Return all the keys of an array.
Parameters…
| Name | input |
|---|---|
| Description | Input array. |
| Type | array |
| Name | search_value |
|---|---|
| Description | Only find keys with this value (NULL: no such filter). |
| Default value | |
| Type | ?mixed |
Returns…
| Description | The keys of the array. |
|---|---|
| Type | array |
array array_intersect(array array1, array array2, ?array array3)
Calculate the intersection between arrays.
Parameters…
| Name | array1 |
|---|---|
| Description | First array. |
| Type | array |
| Name | array2 |
|---|---|
| Description | Second array. |
| Type | array |
| Name | array3 |
|---|---|
| Description | Third array (NULL: only 2). |
| Default value | |
| Type | ?array |
Returns…
| Description | The intersection. |
|---|---|
| Type | array |
array array_merge(array array1, array array2, ?array array3, ?array array4, ?array array5)
Merge two or more arrays.
Parameters…
| Name | array1 |
|---|---|
| Description | First array. |
| Type | array |
| Name | array2 |
|---|---|
| Description | Second array. |
| Type | array |
| Name | array3 |
|---|---|
| Description | Third array (NULL: only 2). |
| Default value | |
| Type | ?array |
| Name | array4 |
|---|---|
| Description | Fourth array to merge (NULL: not this one). |
| Default value | |
| Type | ?array |
| Name | array5 |
|---|---|
| Description | Fifth array to merge (NULL: not this one). |
| Default value | |
| Type | ?array |
Returns…
| Description | Merged array. |
|---|---|
| Type | array |
?mixed array_pop(array array)
Pop the element off the end of array.
Parameters…
| Name | array |
|---|---|
| Description | The array. |
| Type | array |
Returns…
| Description | The value (NULL: no value). |
|---|---|
| Type | ?mixed |
integer array_push(array array, mixed var)
Push one or more elements onto the end of array.
Parameters…
| Name | array |
|---|---|
| Description | The array. |
| Type | array |
| Name | var |
|---|---|
| Description | The value. |
| Type | mixed |
Returns…
| Description | The new number of elements in the array. |
|---|---|
| Type | integer |
array array_reverse(array array, boolean preserve_keys)
Return an array with elements in reverse order.
Parameters…
| Name | array |
|---|---|
| Description | The array to reverse. |
| Type | array |
| Name | preserve_keys |
|---|---|
| Description | Whether to preserve keys. |
| Default value | boolean-false |
| Type | boolean |
Returns…
| Description | The reversed array. |
|---|---|
| Type | array |
mixed array_search(mixed needle, array haystack)
Searches the array for a given value and returns the corresponding key if successful.
Parameters…
| Name | needle |
|---|---|
| Description | Needle. |
| Type | mixed |
| Name | haystack |
|---|---|
| Description | Haystack. |
| Type | array |
Returns…
| Description | The key (false: not found). |
|---|---|
| Type | mixed |
?mixed array_shift(array array)
Shift an element off the beginning of array.
Parameters…
| Name | array |
|---|---|
| Description | The array. |
| Type | array |
Returns…
| Description | Shifted element (NULL: empty array given). |
|---|---|
| Type | ?mixed |
array array_slice(array array, integer offset, ?integer length)
Extract a slice of the array.
Parameters…
| Name | array |
|---|---|
| Description | The array. |
| Type | array |
| Name | offset |
|---|---|
| Description | The offset. |
| Type | integer |
| Name | length |
|---|---|
| Description | The length (NULL: up to the end of the array). |
| Default value | |
| Type | ?integer |
Returns…
| Description | The slice. |
|---|---|
| Type | array |
array array_splice(array input, integer offset, ?integer length, ?array replacement)
Remove a portion of the array and replace it with something else.
Parameters…
| Name | input |
|---|---|
| Description | The array. |
| Type | array |
| Name | offset |
|---|---|
| Description | The offset. |
| Type | integer |
| Name | length |
|---|---|
| Description | The length (NULL: up to the end of the array). |
| Default value | |
| Type | ?integer |
| Name | replacement |
|---|---|
| Description | The replacement (NULL: nothing put in, just bit taken out). |
| Default value | |
| Type | ?array |
Returns…
| Description | The spliced result. |
|---|---|
| Type | array |
array array_unique(array array)
Removes duplicate values from an array. Equivalence determined by string comparison.
Parameters…
| Name | array |
|---|---|
| Description | Input array. |
| Type | array |
Returns…
| Description | Output array. |
|---|---|
| Type | array |
array array_values(array array)
Return all the values of an array.
Parameters…
| Name | array |
|---|---|
| Description | Input array. |
| Type | array |
Returns…
| Description | Output array. |
|---|---|
| Type | array |
void arsort(array array, integer sort_flags)
Sort an array in reverse order and maintain index association.
Parameters…
| Name | array |
|---|---|
| Description | Array. |
| Type | array |
| Name | sort_flags |
|---|---|
| Description | Sort flags. |
| Default value | 0 |
| Type | integer |
(No return value)
void asort(array array, integer sort_flags)
Sort an array and maintain index association.
Parameters…
| Name | array |
|---|---|
| Description | Array. |
| Type | array |
| Name | sort_flags |
|---|---|
| Description | Sort flags. |
| Default value | 0 |
| Type | integer |
(No return value)
~string base64_decode(string encoded_data)
Decodes data encoded with MIME base64.
Parameters…
| Name | encoded_data |
|---|---|
| Description | Encoded data. |
| Type | string |
Returns…
| Description | Decoded data (false: error). |
|---|---|
| Type | ~string |
string base64_encode(string data)
Encodes data with MIME base64.
Parameters…
| Name | data |
|---|---|
| Description | Data. |
| Type | string |
Returns…
| Description | Encoded data. |
|---|---|
| Type | string |
mixed call_user_func(mixed function, ?mixed param_a, ?mixed param_b, ?mixed param_c)
Call a user function given by the first parameter.
Parameters…
| Name | function |
|---|---|
| Description | Function callback. |
| Type | mixed |
| Name | param_a |
|---|---|
| Description | Optional parameter (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | param_b |
|---|---|
| Description | Optional parameter (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | param_c |
|---|---|
| Description | Optional parameter (NULL: none). |
| Default value | |
| Type | ?mixed |
Returns…
| Description | Whatever the function returns. |
|---|---|
| Type | mixed |
float ceil(float function)
Round fractions up.
Parameters…
| Name | function |
|---|---|
| Description | Value to round up. |
| Type | float |
Returns…
| Description | Rounded value. |
|---|---|
| Type | float |
boolean chdir(PATH directory)
Change directory.
Parameters…
| Name | directory |
|---|---|
| Description | Path to change to. |
| Type | PATH |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean checkdate(integer month, integer day, integer year)
Validate a gregorian date.
Parameters…
| Name | month |
|---|---|
| Description | The month. |
| Type | integer |
| Name | day |
|---|---|
| Description | The day. |
| Type | integer |
| Name | year |
|---|---|
| Description | The year. |
| Type | integer |
Returns…
| Description | Whether the date is valid. |
|---|---|
| Type | boolean |
boolean chmod(PATH filename, integer mode)
Changes file mode.
Parameters…
| Name | filename |
|---|---|
| Description | The file to change the mode of. |
| Type | PATH |
| Name | mode |
|---|---|
| Description | The mode (e.g. 0777). |
| Type | integer |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
string chr(integer ascii)
Return a specific character.
Parameters…
| Name | ascii |
|---|---|
| Description | The ASCII code for the character required. |
| Type | integer |
Returns…
| Description | A string of length 1, where the first character is as requested. |
|---|---|
| Type | string |
string chunk_split(string body, integer chunklen, string splitter)
Split a string into smaller chunks. Can be used to split a string into smaller chunks which is useful for e.g. converting base64_encode output to match RFC 2045 semantics. It inserts end (defaults to "\r\n") every chunklen characters.
Parameters…
| Name | body |
|---|---|
| Description | The input string. |
| Type | string |
| Name | chunklen |
|---|---|
| Description | The maximum chunking length. |
| Default value | 76 |
| Type | integer |
| Name | splitter |
|---|---|
| Description | Split character. |
| Default value | |
| Type | string |
Returns…
| Description | The chunked version of the input string. |
|---|---|
| Type | string |
boolean class_exists(string class_name)
Checks if the class has been defined.
Parameters…
| Name | class_name |
|---|---|
| Description | The class identifier. |
| Type | string |
Returns…
| Description | Whether the class has been defined. |
|---|---|
| Type | boolean |
void clearstatcache()
Clears file status cache.
Parameters…
(No return value)
void closedir(resource handle)
Close directory handle.
Parameters…
| Name | handle |
|---|---|
| Description | The directory handle to close. |
| Type | resource |
(No return value)
mixed constant(string name)
Returns the value of a constant.
Parameters…
| Name | name |
|---|---|
| Description | The name of the constant. |
| Type | string |
Returns…
| Description | The value of the constant. |
|---|---|
| Type | mixed |
boolean copy(PATH source, PATH dest)
{{creates-file}}}}
Parameters…
| Name | source |
|---|---|
| Description | The source path. |
| Type | PATH |
| Name | dest |
|---|---|
| Description | The destination path. |
| Type | PATH |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
float cos(float angle)
Calculate the cosine of an angle.
Parameters…
| Name | angle |
|---|---|
| Description | The angle in radians. |
| Type | float |
Returns…
| Description | The cosine. |
|---|---|
| Type | float |
integer count(array var)
Count elements in a variable.
Parameters…
| Name | var |
|---|---|
| Description | Variable to count elements of. |
| Type | array |
Returns…
| Description | The count. |
|---|---|
| Type | integer |
string crypt(string string, ?string salt)
One-way string hashing (not encryption, as not reversible).
Parameters…
| Name | string |
|---|---|
| Description | The string to hash. |
| Type | string |
| Name | salt |
|---|---|
| Description | The salt (NULL: generate a random salt). |
| Default value | |
| Type | ?string |
Returns…
| Description | The hash. The start of the hash determines parameters (encoding, salt). |
|---|---|
| Type | string |
mixed current(array array)
Return the current element in an array.
Parameters…
| Name | array |
|---|---|
| Description | The array. |
| Type | array |
Returns…
| Description | The current element. |
|---|---|
| Type | mixed |
string date(string format, ?TIME timestamp)
Format a local time/date.
Parameters…
| Name | format |
|---|---|
| Description | The format string. |
| Type | string |
| Name | timestamp |
|---|---|
| Description | The timestamp (NULL: current time). |
| Default value | |
| Type | ?TIME |
Returns…
| Description | The string representation of the local time/date. |
|---|---|
| Type | string |
~object dbx_connect(string module, string server, string database, string username, string password, BINARY persistent)
Open a connection to a database Server.
Parameters…
| Name | module |
|---|---|
| Description | Database type. |
| Type | string |
| Name | server |
|---|---|
| Description | The server hostname/IP. |
| Type | string |
| Name | database |
|---|---|
| Description | Database name. |
| Type | string |
| Name | username |
|---|---|
| Description | The username to connect with. |
| Type | string |
| Name | password |
|---|---|
| Description | The password to connect with. |
| Type | string |
| Name | persistent |
|---|---|
| Description | Whether to use a persitent connection. |
| Default value | 0 |
| Type | BINARY |
Returns…
| Description | The connection (false: error) |
|---|---|
| Type | ~object |
string dbx_escape_string(object connection, string unescaped_string)
Escapes a string for use in a dbx_query.
Parameters…
| Name | connection |
|---|---|
| Description | The connection we're escaping for. |
| Type | object |
| Name | unescaped_string |
|---|---|
| Description | Unescaped string. |
| Type | string |
Returns…
| Description | Escaped string. |
|---|---|
| Type | string |
~resource dbx_query(object connection, string query, integer flags)
Send a database query.
Parameters…
| Name | connection |
|---|---|
| Description | The connection we're querying over. |
| Type | object |
| Name | query |
|---|---|
| Description | The query. |
| Type | string |
| Name | flags |
|---|---|
| Description | OR'd Flags (DBX_RESULT_INDEX, DBX_RESULT_INFO, DBX_RESULT_ASSOC). |
| Default value | 0 |
| Type | integer |
Returns…
| Description | The result identifier (false: error). |
|---|---|
| Type | ~resource |
string dechex(integer number)
Integer to string representation of hexadecimal.
Parameters…
| Name | number |
|---|---|
| Description | The integer ('decimal' form, although truly stored in binary). |
| Type | integer |
Returns…
| Description | The string representation. |
|---|---|
| Type | string |
string decoct(integer number)
Integer to string representation of octal.
Parameters…
| Name | number |
|---|---|
| Description | The integer ('decimal' form, although truly stored in binary). |
| Type | integer |
Returns…
| Description | The string representation. |
|---|---|
| Type | string |
boolean define(string name, mixed value)
Defines a named constant.
Parameters…
| Name | name |
|---|---|
| Description | Identifier. |
| Type | string |
| Name | value |
|---|---|
| Description | Value. |
| Type | mixed |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean defined(string name)
Checks whether a given named constant exists.
Parameters…
| Name | name |
|---|---|
| Description | The identifier of a constant. |
| Type | string |
Returns…
| Description | Whether the constant exists. |
|---|---|
| Type | boolean |
PATH dirname(PATH name)
Returns directory name component of path.
Parameters…
| Name | name |
|---|---|
| Description | The path. |
| Type | PATH |
Returns…
| Description | The directory name component. |
|---|---|
| Type | PATH |
~integer disk_free_space(PATH directory)
Returns the amount of free space under a directory in a unix-style mount/quota-supporting filesystem.
Parameters…
| Name | directory |
|---|---|
| Description | The path. |
| Type | PATH |
Returns…
| Description | The amount of space (technically a float, but integer is more conveniant). (false: error) |
|---|---|
| Type | ~integer |
float deg2rad(float number)
Converts the number in degrees to the radian equivalent.
Parameters…
| Name | number |
|---|---|
| Description | Angle in degrees. |
| Type | float |
Returns…
| Description | Angle in radians. |
|---|---|
| Type | float |
boolean error_log(string message, integer message_type, string destination)
Send an error message somewhere.
Parameters…
| Name | message |
|---|---|
| Description | The message to log. |
| Type | string |
| Name | message_type |
|---|---|
| Description | The message type (0 is normal PHP logging system, 1 is e-mail address [non-Roadsend], 2 is debugger connection, 3 is file) |
| Default value | 0 |
| Type | integer |
| Values restricted to | 0 1 2 3 |
| Name | destination |
|---|---|
| Description | The parameter that defines details of the message type (for type 0, meaningless). |
| Default value | |
| Type | string |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
integer error_reporting(?integer level)
Sets which PHP errors are reported.
Parameters…
| Name | level |
|---|---|
| Description | OR'd combination of error type constants. (E_ERROR, E_WARNING, E_PARSE, E_NOTICE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, E_ALL) (NULL: find current level) |
| Default value | |
| Type | ?integer |
Returns…
| Description | Current error reporting level |
|---|---|
| Type | integer |
string exec(PATH command, ?array output, ?integer return_val)
Execute an external program.
Parameters…
| Name | command |
|---|---|
| Description | The path to the system program to execute. |
| Type | PATH |
| Name | output |
|---|---|
| Description | Put output here (technically a reference, but syntax won't let me write it). (NULL: do not get it) |
| Default value | |
| Type | ?array |
| Name | return_val |
|---|---|
| Description | Put return code here (technically a reference, but syntax won't let me write it). (NULL: do not get it) |
| Default value | |
| Type | ?integer |
Returns…
| Description | The stdout output of the program. |
|---|---|
| Type | string |
void exit(string message)
Output a message and terminate the current script.
Parameters…
| Name | message |
|---|---|
| Description | The message. |
| Default value | |
| Type | string |
(No return value)
array explode(string separator, string string, ?integer limit)
Split a string by string.
Parameters…
| Name | separator |
|---|---|
| Description | The separator. |
| Type | string |
| Name | string |
|---|---|
| Description | The string to split. |
| Type | string |
| Name | limit |
|---|---|
| Description | The maximum number of splits (the last element containing the remainder) (NULL: no limit). |
| Default value | |
| Type | ?integer |
Returns…
| Description | The split list. |
|---|---|
| Type | array |
boolean fclose(resource handle)
Closes an open file pointer.
Parameters…
| Name | handle |
|---|---|
| Description | The file pointer. |
| Type | resource |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean feof(resource handle)
Tests for end-of-file on a file pointer.
Parameters…
| Name | handle |
|---|---|
| Description | The file pointer. |
| Type | resource |
Returns…
| Description | Whether the end of the file has been reached. |
|---|---|
| Type | boolean |
string fgets(resource handle, integer length)
Gets line from file pointer.
Parameters…
| Name | handle |
|---|---|
| Description | The file pointer. |
| Type | resource |
| Name | length |
|---|---|
| Description | The maximum length of the line. |
| Type | integer |
Returns…
| Description | The string read. |
|---|---|
| Type | string |
~array file(PATH filename)
Reads entire file into an array.
Parameters…
| Name | filename |
|---|---|
| Description | The file name. |
| Type | PATH |
Returns…
| Description | The array (each line being an entry in the array, and newlines still attached). (false: error) |
|---|---|
| Type | ~array |
boolean file_exists(PATH filename)
Checks whether a file or directory exists.
Parameters…
| Name | filename |
|---|---|
| Description | The path. |
| Type | PATH |
Returns…
| Description | Whether it exists. |
|---|---|
| Type | boolean |
~TIME filectime(PATH filename)
Gets inode change time of file.
Parameters…
| Name | filename |
|---|---|
| Description | The filename. |
| Type | PATH |
Returns…
| Description | Timestamp of creation (negativity is blasphemy) (false: error). |
|---|---|
| Type | ~TIME |
~integer filegroup(PATH filename)
Gets file group.
Parameters…
| Name | filename |
|---|---|
| Description | The filename. |
| Type | PATH |
Returns…
| Description | The posix group ID (false: error). |
|---|---|
| Type | ~integer |
~TIME filemtime(PATH filename)
Gets file modification time.
Parameters…
| Name | filename |
|---|---|
| Description | The filename. |
| Type | PATH |
Returns…
| Description | Timestamp of modification (false: error). |
|---|---|
| Type | ~TIME |
~integer fileowner(PATH filename)
Gets file owner.
Parameters…
| Name | filename |
|---|---|
| Description | The filename. |
| Type | PATH |
Returns…
| Description | The posix user ID (false: error). |
|---|---|
| Type | ~integer |
~integer fileperms(PATH filename)
Gets file permissions.
Parameters…
| Name | filename |
|---|---|
| Description | The filename. |
| Type | PATH |
Returns…
| Description | The permissions (e.g. 0777) (false: error). |
|---|---|
| Type | ~integer |
~integer filesize(PATH filename)
Gets file size.
Parameters…
| Name | filename |
|---|---|
| Description | The filename. |
| Type | PATH |
Returns…
| Description | The file size (false: error). |
|---|---|
| Type | ~integer |
float floatval(mixed var)
Get float value of a variable.
Parameters…
| Name | var |
|---|---|
| Description | The input. |
| Type | mixed |
Returns…
| Description | The float value. |
|---|---|
| Type | float |
float floor(float value)
Round fractions down.
Parameters…
| Name | value |
|---|---|
| Description | The input. |
| Type | float |
Returns…
| Description | The rounded value. |
|---|---|
| Type | float |
array get_defined_vars()
Get an array of all defined variables.
Parameters…
Returns…
| Description | All defined variables. |
|---|---|
| Type | array |
array get_declared_classes()
Get an array of all declared classes.
Parameters…
Returns…
| Description | All declared classes. |
|---|---|
| Type | array |
array get_defined_functions()
Get an array of all defined functions.
Parameters…
Returns…
| Description | All defined functions. |
|---|---|
| Type | array |
~resource fopen(PATH filename, string mode)
{{creates-file}}}}
Parameters…
| Name | filename |
|---|---|
| Description | Filename. |
| Type | PATH |
| Name | mode |
|---|---|
| Description | Mode (e.g. at). |
| Type | string |
Returns…
| Description | The file handle (false: could not be opened). |
|---|---|
| Type | ~resource |
~integer fpassthru(resource handle)
Output all remaining data on a file pointer.
Parameters…
| Name | handle |
|---|---|
| Description | The file handle. |
| Type | resource |
Returns…
| Description | The number of characters that got read (false: error). |
|---|---|
| Type | ~integer |
string fread(resource handle, integer length)
Binary-safe file read.
Parameters…
| Name | handle |
|---|---|
| Description | The file handle. |
| Type | resource |
| Name | length |
|---|---|
| Description | Maximum length to read. |
| Type | integer |
Returns…
| Description | The read data. |
|---|---|
| Type | string |
integer fseek(resource handle, integer offset, integer whence)
Seeks on a file pointer.
Parameters…
| Name | handle |
|---|---|
| Description | The file handle. |
| Type | resource |
| Name | offset |
|---|---|
| Description | The offset (meaning depends on whence). |
| Type | integer |
| Name | whence |
|---|---|
| Description | SEEK_SET, SEEK_CUR or SEEK_END. |
| Default value | 0 |
| Type | integer |
Returns…
| Description | Success status (-1 means error). |
|---|---|
| Type | integer |
~resource fsockopen(string target, integer port, integer errno, string errstr, ?float timeout)
Open Internet or Unix domain socket connection.
Parameters…
| Name | target |
|---|---|
| Description | The target domain/IP to open. |
| Type | string |
| Name | port |
|---|---|
| Description | The target port to open. |
| Type | integer |
| Name | errno |
|---|---|
| Description | Where any error number will be put. |
| Type | integer |
| Name | errstr |
|---|---|
| Description | Whether any error string will be put. |
| Type | string |
| Name | timeout |
|---|---|
| Description | How long to wait until timeout (NULL: no timeout). |
| Default value | |
| Type | ?float |
Returns…
| Description | The handle (false: error). |
|---|---|
| Type | ~resource |
~integer ftell(resource handle)
Gets file pointer read/write position.
Parameters…
| Name | handle |
|---|---|
| Description | The file handle. |
| Type | resource |
Returns…
| Description | The offset (false: error) |
|---|---|
| Type | ~integer |
boolean ftp_chdir(resource ftp_stream, PATH dir)
Changes directories on a FTP server.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The FTP connection. |
| Type | resource |
| Name | dir |
|---|---|
| Description | The directory to change to. |
| Type | PATH |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean ftp_close(resource ftp_stream)
Close an FTP connection.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The FTP connection. |
| Type | resource |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
~resource ftp_connect(string host, integer port, integer timeout)
Make an FTP connection.
Parameters…
| Name | host |
|---|---|
| Description | The FTP server to connect to. |
| Type | string |
| Name | port |
|---|---|
| Description | The port on the FTP server that holds the FTP server application. |
| Default value | 21 |
| Type | integer |
| Name | timeout |
|---|---|
| Description | The timeout after which we give up with an error. |
| Default value | 90 |
| Type | integer |
Returns…
| Description | The FTP connection (false: error). |
|---|---|
| Type | ~resource |
boolean ftp_delete(resource ftp_stream, PATH filename)
Deletes a file on the FTP server.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The FTP connection. |
| Type | resource |
| Name | filename |
|---|---|
| Description | The filename. |
| Type | PATH |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean ftp_fput(resource ftp_stream, PATH remote_file, resource handle, integer mode)
Uploads from an open file to the FTP server.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The FTP connection. |
| Type | resource |
| Name | remote_file |
|---|---|
| Description | The remote filename. |
| Type | PATH |
| Name | handle |
|---|---|
| Description | The open file handle. |
| Type | resource |
| Name | mode |
|---|---|
| Description | The file mode for the remote file (e.g. 0777). |
| Type | integer |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean ftp_login(resource ftp_stream, string username, string password)
Logs in to an FTP connection.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The FTP connection. |
| Type | resource |
| Name | username |
|---|---|
| Description | The username. |
| Type | string |
| Name | password |
|---|---|
| Description | The password. |
| Type | string |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
~string ftp_mkdir(resource ftp_stream, PATH directory)
Creates a directory.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The FTP connection. |
| Type | resource |
| Name | directory |
|---|---|
| Description | The directory to create. |
| Type | PATH |
Returns…
| Description | The directory name (false: error). |
|---|---|
| Type | ~string |
~array ftp_nlist(resource ftp_stream, PATH directory)
Returns a list of files in the given directory.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The FTP connection. |
| Type | resource |
| Name | directory |
|---|---|
| Description | The directory. |
| Type | PATH |
Returns…
| Description | The list of files (false: error). |
|---|---|
| Type | ~array |
boolean ftp_put(resource ftp_stream, PATH remote_file, PATH local_file, integer mode)
Uploads a file to the FTP server.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The FTP connection. |
| Type | resource |
| Name | remote_file |
|---|---|
| Description | The remote filename. |
| Type | PATH |
| Name | local_file |
|---|---|
| Description | The local filename. |
| Type | PATH |
| Name | mode |
|---|---|
| Description | The file mode for the remote file (e.g. 0777). |
| Type | integer |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean ftp_rename(resource ftp_stream, PATH from, PATH to)
Renames a file on the FTP server.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The FTP connection. |
| Type | resource |
| Name | from |
|---|---|
| Description | Original path. |
| Type | PATH |
| Name | to |
|---|---|
| Description | New path. |
| Type | PATH |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean ftp_rmdir(resource ftp_stream, PATH directory)
Removes a directory on the FTP server.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The FTP connection. |
| Type | resource |
| Name | directory |
|---|---|
| Description | The directory to remove. |
| Type | PATH |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean ftp_site(resource ftp_stream, string cmd)
Sends a SITE command to the FTP server.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The FTP connection. |
| Type | resource |
| Name | cmd |
|---|---|
| Description | The SITE command. |
| Type | string |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
~integer ftp_size(resource ftp_stream, PATH cmd)
Find the file size of a file on the FTP server.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The FTP connection. |
| Type | resource |
| Name | cmd |
|---|---|
| Description | The file's path. |
| Type | PATH |
Returns…
| Description | The file size (false: error). |
|---|---|
| Type | ~integer |
boolean function_exists(string function_name)
Find whether the function of the given function name has been defined.
Parameters…
| Name | function_name |
|---|---|
| Description | The name of the function. |
| Type | string |
Returns…
| Description | Whether it is defined. |
|---|---|
| Type | boolean |
~integer fwrite(resource handle, string string, ?integer length)
Binary-safe file write.
Parameters…
| Name | handle |
|---|---|
| Description | The file handle. |
| Type | resource |
| Name | string |
|---|---|
| Description | The string to write to the file. |
| Type | string |
| Name | length |
|---|---|
| Description | The length of data to write (NULL: all of $string). |
| Default value | |
| Type | ?integer |
Returns…
| Description | The number of bytes written (false: error). |
|---|---|
| Type | ~integer |
array gd_info()
Retrieve information about the currently installed GD library.
Parameters…
Returns…
| Description | Array of information. |
|---|---|
| Type | array |
string get_class(object obj)
Returns the name of the class of an object.
Parameters…
| Name | obj |
|---|---|
| Description | The object. |
| Type | object |
Returns…
| Description | The class name. |
|---|---|
| Type | string |
array get_html_translation_table(integer table, integer quote_style)
Returns the translation table used by htmlspecialchars and htmlentities.
Parameters…
| Name | table |
|---|---|
| Description | The table to select (HTML_ENTITIES or HTML_SPECIALCHARS). |
| Type | integer |
| Name | quote_style |
|---|---|
| Description | The quote style (ENT_QUOTES or ENT_NOQUOTES or ENT_COMPAT). |
| Default value | 2 |
| Type | integer |
Returns…
| Description | The translation table. |
|---|---|
| Type | array |
boolean get_magic_quotes_gpc()
Gets the current active configuration setting of magic quotes gpc. (Note: it actually returns a BINARY, but lets make it cleaner, it won't hurt)
Parameters…
Returns…
| Description | Whether magic quotes gpc is on. |
|---|---|
| Type | boolean |
PATH getcwd()
Gets the current working directory.
Parameters…
Returns…
| Description | The cwd. |
|---|---|
| Type | PATH |
array getdate(?TIME timestamp)
Get date/time information.
Parameters…
| Name | timestamp |
|---|---|
| Description | Timestamp to get information for (NULL: now). |
| Default value | |
| Type | ?TIME |
Returns…
| Description | The information. |
|---|---|
| Type | array |
~string getenv(string string)
Gets the value of an environment variable.
Parameters…
| Name | string |
|---|---|
| Description | The environment name to get (e.g. PATH). |
| Type | string |
Returns…
| Description | The value (false: error). |
|---|---|
| Type | ~string |
string gmdate(string format, ?TIME timestamp)
Format a GMT/UTC date/time (uses different format to 'date' function).
Parameters…
| Name | format |
|---|---|
| Description | The 'gm' format string. |
| Type | string |
| Name | timestamp |
|---|---|
| Description | Timestamp to use (NULL: now). |
| Default value | |
| Type | ?TIME |
Returns…
| Description | The formatted string. |
|---|---|
| Type | string |
boolean gzclose(resource handle)
Close an open gz-file pointer.
Parameters…
| Name | handle |
|---|---|
| Description | The handle. |
| Type | resource |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
~resource gzopen(PATH filename, string mode)
{{creates-file}}}}
Parameters…
| Name | filename |
|---|---|
| Description | The filename. |
| Type | PATH |
| Name | mode |
|---|---|
| Description | The mode (e.g. b). |
| Type | string |
Returns…
| Description | The handle (false: error). |
|---|---|
| Type | ~resource |
~integer gzwrite(resource handle, string string, ?integer length)
Binary-safe gz-file write.
Parameters…
| Name | handle |
|---|---|
| Description | The file handle. |
| Type | resource |
| Name | string |
|---|---|
| Description | The string to write to the file. |
| Type | string |
| Name | length |
|---|---|
| Description | The length of data to write (NULL: full length of input string). |
| Default value | |
| Type | ?integer |
Returns…
| Description | The number of bytes written (false: error). |
|---|---|
| Type | ~integer |
void header(string string, boolean replace_last)
Send a raw HTTP header.
Parameters…
| Name | string |
|---|---|
| Description | The header to send. |
| Type | string |
| Name | replace_last |
|---|---|
| Description | Whether to replace a previous call to set the same header (if you choose to not replace, it will send two different values for the same header). |
| Default value | boolean-true |
| Type | boolean |
(No return value)
boolean headers_sent()
Checks if or where headers have been sent.
Parameters…
Returns…
| Description | The answer. |
|---|---|
| Type | boolean |
integer hexdec(string hex_string)
String representation of hexadecimal to decimal.
Parameters…
| Name | hex_string |
|---|---|
| Description | The string representation. |
| Type | string |
Returns…
| Description | The integer ('decimal' form, although truly stored in binary). |
|---|---|
| Type | integer |
string htmlentities(string string, integer quote_style, string charset)
Convert all applicable characters to HTML entities.
Parameters…
| Name | string |
|---|---|
| Description | The string to encode. |
| Type | string |
| Name | quote_style |
|---|---|
| Description | The quote style (ENT_COMPAT, ENT_QUOTES, ENT_NOQUOTES). |
| Default value | 2 |
| Type | integer |
| Name | charset |
|---|---|
| Description | The character set to use. |
| Default value | |
| Type | string |
Returns…
| Description | The encoded string. |
|---|---|
| Type | string |
boolean imagealphablending(resource image, boolean blendmode)
Set the blending mode for an image.
Parameters…
| Name | image |
|---|---|
| Description | The image handle. |
| Type | resource |
| Name | blendmode |
|---|---|
| Description | Whether to alpha blend. |
| Type | boolean |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
integer imagecolorallocate(resource image, integer red, integer green, integer blue)
Allocate a color for an image.
Parameters…
| Name | image |
|---|---|
| Description | The image handle. |
| Type | resource |
| Name | red |
|---|---|
| Description | Red component (0-255). |
| Type | integer |
| Name | green |
|---|---|
| Description | Green component (0-255). |
| Type | integer |
| Name | blue |
|---|---|
| Description | Blue component (0-255). |
| Type | integer |
Returns…
| Description | Combined colour identifier. |
|---|---|
| Type | integer |
integer imagecolortransparent(resource image, ?integer color)
Define a color as transparent.
Parameters…
| Name | image |
|---|---|
| Description | The image handle. |
| Type | resource |
| Name | color |
|---|---|
| Description | Transparency colour identifier (NULL: get it, don't set it). |
| Default value | |
| Type | ?integer |
Returns…
| Description | Transparency colour identifier. |
|---|---|
| Type | integer |
void imagecopy(resource dst_im, resource src_im, integer dst_x, integer dst_y, integer src_x, integer src_y, integer src_w, integer src_h)
Copy part of an image.
Parameters…
| Name | dst_im |
|---|---|
| Description | Destination image handle. |
| Type | resource |
| Name | src_im |
|---|---|
| Description | Source image handle. |
| Type | resource |
| Name | dst_x |
|---|---|
| Description | Destination X-ordinate. |
| Type | integer |
| Name | dst_y |
|---|---|
| Description | Destination Y-ordinate. |
| Type | integer |
| Name | src_x |
|---|---|
| Description | Source X-ordinate. |
| Type | integer |
| Name | src_y |
|---|---|
| Description | Source Y-ordinate. |
| Type | integer |
| Name | src_w |
|---|---|
| Description | Width to copy. |
| Type | integer |
| Name | src_h |
|---|---|
| Description | Height to copy. |
| Type | integer |
(No return value)
boolean imagecopyresampled(resource dst_im, resource src_im, integer dst_x, integer dst_y, integer src_x, integer src_y, integer dst_w, integer dst_h, integer src_w, integer src_h)
Copy and resize part of an image with resampling.
Parameters…
| Name | dst_im |
|---|---|
| Description | Destination image handle. |
| Type | resource |
| Name | src_im |
|---|---|
| Description | Source image handle. |
| Type | resource |
| Name | dst_x |
|---|---|
| Description | Destination X-ordinate. |
| Type | integer |
| Name | dst_y |
|---|---|
| Description | Destination Y-ordinate. |
| Type | integer |
| Name | src_x |
|---|---|
| Description | Source X-ordinate. |
| Type | integer |
| Name | src_y |
|---|---|
| Description | Source Y-ordinate. |
| Type | integer |
| Name | dst_w |
|---|---|
| Description | Destination width. |
| Type | integer |
| Name | dst_h |
|---|---|
| Description | Destination height. |
| Type | integer |
| Name | src_w |
|---|---|
| Description | Source width. |
| Type | integer |
| Name | src_h |
|---|---|
| Description | Source height. |
| Type | integer |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
void imagecopyresized(resource dst_im, resource src_im, integer dst_x, integer dst_y, integer src_x, integer src_y, integer dst_w, integer dst_h, integer src_w, integer src_h)
Copy and resize part of an image.
Parameters…
| Name | dst_im |
|---|---|
| Description | Destination image handle. |
| Type | resource |
| Name | src_im |
|---|---|
| Description | Source image handle. |
| Type | resource |
| Name | dst_x |
|---|---|
| Description | Destination X-ordinate. |
| Type | integer |
| Name | dst_y |
|---|---|
| Description | Destination Y-ordinate. |
| Type | integer |
| Name | src_x |
|---|---|
| Description | Source X-ordinate. |
| Type | integer |
| Name | src_y |
|---|---|
| Description | Source Y-ordinate. |
| Type | integer |
| Name | dst_w |
|---|---|
| Description | Destination width. |
| Type | integer |
| Name | dst_h |
|---|---|
| Description | Destination height. |
| Type | integer |
| Name | src_w |
|---|---|
| Description | Source width. |
| Type | integer |
| Name | src_h |
|---|---|
| Description | Source height. |
| Type | integer |
(No return value)
resource imagecreate(integer width, integer height)
Create a new palette based image.
Parameters…
| Name | width |
|---|---|
| Description | Width. |
| Type | integer |
| Name | height |
|---|---|
| Description | Height. |
| Type | integer |
Returns…
| Description | The image handle. |
|---|---|
| Type | resource |
~resource imagecreatefromstring(string image)
Create a new image from the image stream in the string.
Parameters…
| Name | image |
|---|---|
| Description | The image. |
| Type | string |
Returns…
| Description | The image handle (false: error). |
|---|---|
| Type | ~resource |
~resource imagecreatefrompng(PATH path)
Create a new image from a PNG file on disk.
Parameters…
| Name | path |
|---|---|
| Description | The PNG file. |
| Type | PATH |
Returns…
| Description | The image handle (false: error). |
|---|---|
| Type | ~resource |
~resource imagecreatefromjpeg(PATH path)
Create a new image from a JPEG file on disk.
Parameters…
| Name | path |
|---|---|
| Description | The JPEG file. |
| Type | PATH |
Returns…
| Description | The image handle (false: error). |
|---|---|
| Type | ~resource |
resource imagecreatetruecolor(integer x, integer y)
Create a new true color image.
Parameters…
| Name | x |
|---|---|
| Description | Width. |
| Type | integer |
| Name | y |
|---|---|
| Description | Height. |
| Type | integer |
Returns…
| Description | The image handle. |
|---|---|
| Type | resource |
integer imagecolorat(resource image, integer x, integer y)
Get the index of the color of a pixel.
Parameters…
| Name | image |
|---|---|
| Description | The image handle. |
| Type | resource |
| Name | x |
|---|---|
| Description | X ordinate. |
| Type | integer |
| Name | y |
|---|---|
| Description | Y ordinate. |
| Type | integer |
Returns…
| Description | The colour. |
|---|---|
| Type | integer |
array imagecolorsforindex(resource image, integer color)
Get the colors for an index.
Parameters…
| Name | image |
|---|---|
| Description | The image handle. |
| Type | resource |
| Name | color |
|---|---|
| Description | The colour. |
| Type | integer |
Returns…
| Description | Map of components. |
|---|---|
| Type | array |
void imagedestroy(resource image)
Destroy an image resource.
Parameters…
| Name | image |
|---|---|
| Description | The image handle. |
| Type | resource |
(No return value)
void imagefill(resource image, integer x, integer y, integer colour)
Flood fill.
Parameters…
| Name | image |
|---|---|
| Description | The image handle. |
| Type | resource |
| Name | x |
|---|---|
| Description | Start from X. |
| Type | integer |
| Name | y |
|---|---|
| Description | Start from Y. |
| Type | integer |
| Name | colour |
|---|---|
| Description | The colour code to use. |
| Type | integer |
(No return value)
integer imagefontheight(integer font)
Get font height.
Parameters…
| Name | font |
|---|---|
| Description | Font code. |
| Type | integer |
Returns…
| Description | Height. |
|---|---|
| Type | integer |
integer imagefontwidth(integer font)
Get font width.
Parameters…
| Name | font |
|---|---|
| Description | Font code. |
| Type | integer |
Returns…
| Description | Width. |
|---|---|
| Type | integer |
boolean imagejpeg(resource image, ?string filename, ?integer quality)
Output image to browser or file as JPEG.
Parameters…
| Name | image |
|---|---|
| Description | The image handle. |
| Type | resource |
| Name | filename |
|---|---|
| Description | The filename (NULL: output to browser). |
| Default value | |
| Type | ?string |
| Name | quality |
|---|---|
| Description | Quality level (NULL: default). |
| Default value | |
| Type | ?integer |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean imagepng(resource image, ?string filename)
Output image to browser or file as PNG.
Parameters…
| Name | image |
|---|---|
| Description | The image handle. |
| Type | resource |
| Name | filename |
|---|---|
| Description | The filename (NULL: output to browser). |
| Default value | |
| Type | ?string |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
void imagesavealpha(resource image, boolean saveflag)
Set the flag to save full alpha channel information (as opposed to single-color transparency) when saving PNG images.
Parameters…
| Name | image |
|---|---|
| Description | The image handle. |
| Type | resource |
| Name | saveflag |
|---|---|
| Description | Whether to save alpha channel information. |
| Type | boolean |
(No return value)
void imagesetpixel(resource image, integer x, integer y, integer color)
Set a single pixel.
Parameters…
| Name | image |
|---|---|
| Description | The image handle. |
| Type | resource |
| Name | x |
|---|---|
| Description | X-ordinate. |
| Type | integer |
| Name | y |
|---|---|
| Description | Y-ordinate. |
| Type | integer |
| Name | color |
|---|---|
| Description | Colour code. |
| Type | integer |
(No return value)
void imagestring(resource image, integer font, integer x, integer y, string s, integer col)
Draw a string horizontally.
Parameters…
| Name | image |
|---|---|
| Description | The image handle. |
| Type | resource |
| Name | font |
|---|---|
| Description | Font code. |
| Type | integer |
| Name | x |
|---|---|
| Description | X-ordinate. |
| Type | integer |
| Name | y |
|---|---|
| Description | Y-ordinate. |
| Type | integer |
| Name | s |
|---|---|
| Description | Text to draw. |
| Type | string |
| Name | col |
|---|---|
| Description | Colour code. |
| Type | integer |
(No return value)
integer imagesx(resource image)
Get image width.
Parameters…
| Name | image |
|---|---|
| Description | The image handle. |
| Type | resource |
Returns…
| Description | The image width. |
|---|---|
| Type | integer |
integer imagesy(resource image)
Get image height.
Parameters…
| Name | image |
|---|---|
| Description | The image handle. |
| Type | resource |
Returns…
| Description | The image height. |
|---|---|
| Type | integer |
void imagestringup(resource image, integer font, integer x, integer y, string s, integer col)
Give the bounding box of a text using TrueType fonts.
Parameters…
| Name | image |
|---|---|
| Description | The image handle. |
| Type | resource |
| Name | font |
|---|---|
| Description | The loaded font. |
| Type | integer |
| Name | x |
|---|---|
| Description | X-ordinate. |
| Type | integer |
| Name | y |
|---|---|
| Description | Y-ordinate. |
| Type | integer |
| Name | s |
|---|---|
| Description | Text to draw. |
| Type | string |
| Name | col |
|---|---|
| Description | Colour code. |
| Type | integer |
(No return value)
~array imagettfbbox(float size, float angle, string fontfile, string text)
Give the bounding box of a text using TrueType fonts.
Parameters…
| Name | size |
|---|---|
| Description | The font size in pixels. |
| Type | float |
| Name | angle |
|---|---|
| Description | Angle in degrees in which text will be measured. |
| Type | float |
| Name | fontfile |
|---|---|
| Description | The name of the TrueType font file. |
| Type | string |
| Name | text |
|---|---|
| Description | The string to be measured. |
| Type | string |
Returns…
| Description | Tuple: lower-left-X, lower-left-Y, lower-right-X, lower-right-Y, upper-right-X, upper-right-Y, upper-left-X, upper-left-Y. (false: error) |
|---|---|
| Type | ~array |
~array imagettftext(resource handle, float size, float angle, integer x, integer y, integer colour, string fontfile, string text)
Give the bounding box of a text using TrueType fonts.
Parameters…
| Name | handle |
|---|---|
| Description | The image handle. |
| Type | resource |
| Name | size |
|---|---|
| Description | The font size in pixels. |
| Type | float |
| Name | angle |
|---|---|
| Description | Angle in degrees in which text will be measured. |
| Type | float |
| Name | x |
|---|---|
| Description | X-ordinate. |
| Type | integer |
| Name | y |
|---|---|
| Description | Y-ordinate. |
| Type | integer |
| Name | colour |
|---|---|
| Description | Colour code. |
| Type | integer |
| Name | fontfile |
|---|---|
| Description | The name of the TrueType font file. |
| Type | string |
| Name | text |
|---|---|
| Description | Text to draw. |
| Type | string |
Returns…
| Description | Tuple: lower-left-X, lower-left-Y, lower-right-X, lower-right-Y, upper-right-X, upper-right-Y, upper-left-X, upper-left-Y. (false: error) |
|---|---|
| Type | ~array |
integer imagetypes()
Return the image types supported by this execution environment.
Parameters…
Returns…
| Description | Bit field of constants: IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP. |
|---|---|
| Type | integer |
boolean imagearc(resource image, integer cx, integer cy, integer w, integer h, integer s, integer e, integer color)
Draw a partial ellipse.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | cx |
|---|---|
| Description | X@top-left. |
| Type | integer |
| Name | cy |
|---|---|
| Description | Y@top-left. |
| Type | integer |
| Name | w |
|---|---|
| Description | width. |
| Type | integer |
| Name | h |
|---|---|
| Description | height. |
| Type | integer |
| Name | s |
|---|---|
| Description | start degrees (0 degrees = 3 o clock). |
| Type | integer |
| Name | e |
|---|---|
| Description | end degrees (0 degrees = 3 o clock). |
| Type | integer |
| Name | color |
|---|---|
| Description | Colour code. |
| Type | integer |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean imagefilledarc(resource image, integer cx, integer cy, integer w, integer h, integer s, integer e, integer color, integer style)
Draw a partial ellipse and fill it.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | cx |
|---|---|
| Description | X@top-left. |
| Type | integer |
| Name | cy |
|---|---|
| Description | Y@top-left. |
| Type | integer |
| Name | w |
|---|---|
| Description | width. |
| Type | integer |
| Name | h |
|---|---|
| Description | height. |
| Type | integer |
| Name | s |
|---|---|
| Description | start degrees (0 degrees = 3 o clock). |
| Type | integer |
| Name | e |
|---|---|
| Description | end degrees (0 degrees = 3 o clock). |
| Type | integer |
| Name | color |
|---|---|
| Description | Style, bitwise of IMG_ARC_PIE, IMG_ARC_CHORD, IMG_ARC_NOFILL, IMG_ARC_EDGED. |
| Type | integer |
| Name | style |
|---|---|
| Description | Colour code. |
| Type | integer |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
void imagecopymergegray(resource dst_im, resource src_im, integer dst_x, integer dst_y, integer src_x, integer src_y, integer src_w, integer src_h, integer pct)
Copy and merge part of an image with gray scale.
Parameters…
| Name | dst_im |
|---|---|
| Description | Destination image handle. |
| Type | resource |
| Name | src_im |
|---|---|
| Description | Source image handle. |
| Type | resource |
| Name | dst_x |
|---|---|
| Description | Destination X-ordinate. |
| Type | integer |
| Name | dst_y |
|---|---|
| Description | Destination Y-ordinate. |
| Type | integer |
| Name | src_x |
|---|---|
| Description | Source X-ordinate. |
| Type | integer |
| Name | src_y |
|---|---|
| Description | Source Y-ordinate. |
| Type | integer |
| Name | src_w |
|---|---|
| Description | Width to copy. |
| Type | integer |
| Name | src_h |
|---|---|
| Description | Height to copy. |
| Type | integer |
| Name | pct |
|---|---|
| Description | Opacity value. |
| Type | integer |
(No return value)
void imageline(resource image, integer x1, integer y1, integer x2, integer y2, integer color)
Draw a line.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | x1 |
|---|---|
| Description | Start-X. |
| Type | integer |
| Name | y1 |
|---|---|
| Description | Start-Y. |
| Type | integer |
| Name | x2 |
|---|---|
| Description | End-X. |
| Type | integer |
| Name | y2 |
|---|---|
| Description | End-Y. |
| Type | integer |
| Name | color |
|---|---|
| Description | The colour. |
| Type | integer |
(No return value)
boolean imageellipse(resource image, integer cx, integer cy, integer w, integer h, integer color)
Draw an ellipse.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | cx |
|---|---|
| Description | Centre-X. |
| Type | integer |
| Name | cy |
|---|---|
| Description | Centre-Y. |
| Type | integer |
| Name | w |
|---|---|
| Description | Width. |
| Type | integer |
| Name | h |
|---|---|
| Description | Height. |
| Type | integer |
| Name | color |
|---|---|
| Description | Colour. |
| Type | integer |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean imagefilledellipse(resource image, integer cx, integer cy, integer w, integer h, integer color)
Draw a filled ellipse.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | cx |
|---|---|
| Description | Centre-X. |
| Type | integer |
| Name | cy |
|---|---|
| Description | Centre-Y. |
| Type | integer |
| Name | w |
|---|---|
| Description | Width. |
| Type | integer |
| Name | h |
|---|---|
| Description | Height. |
| Type | integer |
| Name | color |
|---|---|
| Description | Colour. |
| Type | integer |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
void imagechar(resource image, integer font, integer x, integer y, string c, integer color)
Draw a character horizontally.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | font |
|---|---|
| Description | Font number. |
| Type | integer |
| Name | x |
|---|---|
| Description | X. |
| Type | integer |
| Name | y |
|---|---|
| Description | Y. |
| Type | integer |
| Name | c |
|---|---|
| Description | What to write. |
| Type | string |
| Name | color |
|---|---|
| Description | Colour number. |
| Type | integer |
(No return value)
void imagefilledpolygon(resource image, array points, integer num_points, integer colour)
Draw a filled polygon.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | points |
|---|---|
| Description | Array of pairs. |
| Type | array |
| Name | num_points |
|---|---|
| Description | Number of points in array. |
| Type | integer |
| Name | colour |
|---|---|
| Description | Colour number. |
| Type | integer |
(No return value)
void imagepolygon(resource image, array points, integer num_points, integer colour)
Draw a polygon.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | points |
|---|---|
| Description | Array of pairs. |
| Type | array |
| Name | num_points |
|---|---|
| Description | Number of points in array. |
| Type | integer |
| Name | colour |
|---|---|
| Description | Colour number. |
| Type | integer |
(No return value)
void imagefilledrectangle(resource image, integer x1, integer y1, integer x2, integer y2, integer col)
Draw a filled rectangle.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | x1 |
|---|---|
| Description | First-X. |
| Type | integer |
| Name | y1 |
|---|---|
| Description | First-Y. |
| Type | integer |
| Name | x2 |
|---|---|
| Description | Second-X. |
| Type | integer |
| Name | y2 |
|---|---|
| Description | Second-Y. |
| Type | integer |
| Name | col |
|---|---|
| Description | Colour number. |
| Type | integer |
(No return value)
void imagerectangle(resource image, integer x1, integer y1, integer x2, integer y2, integer col)
Draw a rectangle.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | x1 |
|---|---|
| Description | First-X. |
| Type | integer |
| Name | y1 |
|---|---|
| Description | First-Y. |
| Type | integer |
| Name | x2 |
|---|---|
| Description | Second-X. |
| Type | integer |
| Name | y2 |
|---|---|
| Description | Second-Y. |
| Type | integer |
| Name | col |
|---|---|
| Description | Colour number. |
| Type | integer |
(No return value)
void imagefilltoborder(resource image, integer x, integer y, integer border, integer color)
Flood fill to specific color.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | x |
|---|---|
| Description | Origin X. |
| Type | integer |
| Name | y |
|---|---|
| Description | Origin Y. |
| Type | integer |
| Name | border |
|---|---|
| Description | Border colour number. |
| Type | integer |
| Name | color |
|---|---|
| Description | Fill colour number. |
| Type | integer |
(No return value)
void imagegammacorrect(resource image, float in, float out)
Apply a gamma correction to a GD image.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | in |
|---|---|
| Description | Input gamma. |
| Type | float |
| Name | out |
|---|---|
| Description | Output gamma. |
| Type | float |
(No return value)
boolean imageinterlace(resource image, BINARY interlace)
Enable or disable interlace / progressive-save.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | interlace |
|---|---|
| Description | On/Off. |
| Type | BINARY |
Returns…
| Description | Whether interlace is set. |
|---|---|
| Type | boolean |
~integer imageloadfont(PATH file)
Load a new font.
Parameters…
| Name | file |
|---|---|
| Description | File. |
| Type | PATH |
Returns…
| Description | Font code (false: error). |
|---|---|
| Type | ~integer |
void imagepalettecopy(resource destination, resource source)
Copy the palette from one image to another.
Parameters…
| Name | destination |
|---|---|
| Description | The image the palette is from. |
| Type | resource |
| Name | source |
|---|---|
| Description | The image the palette is to. |
| Type | resource |
(No return value)
boolean imagesetbrush(resource image, resource brush)
Set the brush image for line drawing.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | brush |
|---|---|
| Description | The brush image. |
| Type | resource |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
void imagesetstyle(resource image, integer style)
Set the style for line drawing.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | style |
|---|---|
| Description | Style number (IMG_COLOR_STYLED or IMG_COLOR_STYLEDBRUSHED). |
| Type | integer |
(No return value)
boolean imagesetthickness(resource image, integer thickness)
Set the thickness for line drawing.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | thickness |
|---|---|
| Description | Thickness in pixels. |
| Type | integer |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean imagesettile(resource image, resource tile)
Set the tile image for filling.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | tile |
|---|---|
| Description | The tile image. |
| Type | resource |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
void imagetruecolortopalette(resource image, boolean dither, integer ncolors)
Convert a true color image to a palette image.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | dither |
|---|---|
| Description | Whether to use dithering. |
| Type | boolean |
| Name | ncolors |
|---|---|
| Description | The maximum number of colors that should be retained in the palette. |
| Type | integer |
(No return value)
void imagecharup(resource image, integer font, integer x, integer y, string c, integer color)
Draw a character vertically.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | font |
|---|---|
| Description | Font number. |
| Type | integer |
| Name | x |
|---|---|
| Description | X. |
| Type | integer |
| Name | y |
|---|---|
| Description | Y. |
| Type | integer |
| Name | c |
|---|---|
| Description | What to write. |
| Type | string |
| Name | color |
|---|---|
| Description | Colour number. |
| Type | integer |
(No return value)
integer imagecolorclosest(resource image, integer red, integer green, integer blue)
Get the index of the closest color to the specified color.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | red |
|---|---|
| Description | Red. |
| Type | integer |
| Name | green |
|---|---|
| Description | Green. |
| Type | integer |
| Name | blue |
|---|---|
| Description | Blue. |
| Type | integer |
Returns…
| Description | Colour number. |
|---|---|
| Type | integer |
integer imagecolorclosestalpha(resource image, integer red, integer green, integer blue, integer alpha)
Get the index of the closest color to the specified color + alpha.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | red |
|---|---|
| Description | Red. |
| Type | integer |
| Name | green |
|---|---|
| Description | Green. |
| Type | integer |
| Name | blue |
|---|---|
| Description | Blue. |
| Type | integer |
| Name | alpha |
|---|---|
| Description | Alpha. |
| Type | integer |
Returns…
| Description | Colour number. |
|---|---|
| Type | integer |
integer imagecolorclosesthwb(resource image, integer red, integer green, integer blue)
Get the index of the color which has the hue, white and blackness nearest to the given color .
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | red |
|---|---|
| Description | Red. |
| Type | integer |
| Name | green |
|---|---|
| Description | Green. |
| Type | integer |
| Name | blue |
|---|---|
| Description | Blue. |
| Type | integer |
Returns…
| Description | Colour number. |
|---|---|
| Type | integer |
boolean imagecolordeallocate(resource image, integer colour)
De-allocate a color for an image.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | colour |
|---|---|
| Description | Colour number. |
| Type | integer |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
integer imagecolorexact(resource image, integer red, integer green, integer blue)
Get the index of the specified color.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | red |
|---|---|
| Description | Red. |
| Type | integer |
| Name | green |
|---|---|
| Description | Green. |
| Type | integer |
| Name | blue |
|---|---|
| Description | Blue. |
| Type | integer |
Returns…
| Description | Colour number. |
|---|---|
| Type | integer |
~integer imagecolorexactalpha(resource image, integer red, integer green, integer blue, integer alpha)
Get the index of the specified color + alpha.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | red |
|---|---|
| Description | Red. |
| Type | integer |
| Name | green |
|---|---|
| Description | Green. |
| Type | integer |
| Name | blue |
|---|---|
| Description | Blue. |
| Type | integer |
| Name | alpha |
|---|---|
| Description | Alpha. |
| Type | integer |
Returns…
| Description | Colour number (false: error). |
|---|---|
| Type | ~integer |
integer imagecolorresolve(resource image, integer red, integer green, integer blue)
Get the index of the specified color or its closest possible alternative.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | red |
|---|---|
| Description | Red. |
| Type | integer |
| Name | green |
|---|---|
| Description | Green. |
| Type | integer |
| Name | blue |
|---|---|
| Description | Blue. |
| Type | integer |
Returns…
| Description | Colour number. |
|---|---|
| Type | integer |
~integer imagecolorresolvealpha(resource image, integer red, integer green, integer blue, integer alpha)
Get the index of the specified color + alpha or its closest possible alternative.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | red |
|---|---|
| Description | Red. |
| Type | integer |
| Name | green |
|---|---|
| Description | Green. |
| Type | integer |
| Name | blue |
|---|---|
| Description | Blue. |
| Type | integer |
| Name | alpha |
|---|---|
| Description | Alpha. |
| Type | integer |
Returns…
| Description | Colour number (false: error). |
|---|---|
| Type | ~integer |
void imagecolorset(resource image, integer red, integer green, integer blue)
Set the color for the specified palette index.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
| Name | red |
|---|---|
| Description | Red. |
| Type | integer |
| Name | green |
|---|---|
| Description | Green. |
| Type | integer |
| Name | blue |
|---|---|
| Description | Blue. |
| Type | integer |
(No return value)
integer imagecolorstotal(resource image)
Find out the number of colors in an image's palette.
Parameters…
| Name | image |
|---|---|
| Description | The image involved. |
| Type | resource |
Returns…
| Description | Total number of colours. |
|---|---|
| Type | integer |
void imagecopymerge(resource dst_im, resource src_im, integer dst_x, integer dst_y, integer src_x, integer src_y, integer src_w, integer src_h, integer pct)
Copy and merge part of an image.
Parameters…
| Name | dst_im |
|---|---|
| Description | Destination image handle. |
| Type | resource |
| Name | src_im |
|---|---|
| Description | Source image handle. |
| Type | resource |
| Name | dst_x |
|---|---|
| Description | Destination X-ordinate. |
| Type | integer |
| Name | dst_y |
|---|---|
| Description | Destination Y-ordinate. |
| Type | integer |
| Name | src_x |
|---|---|
| Description | Source X-ordinate. |
| Type | integer |
| Name | src_y |
|---|---|
| Description | Source Y-ordinate. |
| Type | integer |
| Name | src_w |
|---|---|
| Description | Width to copy. |
| Type | integer |
| Name | src_h |
|---|---|
| Description | Height to copy. |
| Type | integer |
| Name | pct |
|---|---|
| Description | Opacity value. |
| Type | integer |
(No return value)
string implode(string glue, array pieces)
Join array elements with a string.
Parameters…
| Name | glue |
|---|---|
| Description | The glue component (becomes a deliminator). |
| Type | string |
| Name | pieces |
|---|---|
| Description | The pieces to join. |
| Type | array |
Returns…
| Description | The joined string. |
|---|---|
| Type | string |
boolean in_array(mixed needle, array haystack)
Checks if a value exists in an array.
Parameters…
| Name | needle |
|---|---|
| Description | Needle. |
| Type | mixed |
| Name | haystack |
|---|---|
| Description | Haystack. |
| Type | array |
Returns…
| Description | Whether the value exists in the array. |
|---|---|
| Type | boolean |
mixed include(PATH filename)
Include and evaluate the specified file.
Parameters…
| Name | filename |
|---|---|
| Description | The filename of the file to include. |
| Type | PATH |
Returns…
| Description | Success status or returned value. |
|---|---|
| Type | mixed |
mixed include_once(PATH filename)
Include and evaluate the specified file, but only if it has not already been included.
Parameters…
| Name | filename |
|---|---|
| Description | The filename of the file to include. |
| Type | PATH |
Returns…
| Description | Success status or returned value. |
|---|---|
| Type | mixed |
mixed ini_get(string varname)
Gets the value of a configuration option. Note: On Phalanger any unknown config options will produce a warning if fetched.
Parameters…
| Name | varname |
|---|---|
| Description | Config option. |
| Type | string |
Returns…
| Description | Value of option. (empty: no such config option, or an empty value) (false: ditto) |
|---|---|
| Type | mixed |
~string ini_set(string var, string value)
Sets the value of a configuration option.
Parameters…
| Name | var |
|---|---|
| Description | Config option. |
| Type | string |
| Name | value |
|---|---|
| Description | New value of option. |
| Type | string |
Returns…
| Description | Old value of option (false: error). |
|---|---|
| Type | ~string |
integer intval(mixed var, integer base)
Get integer value of a variable.
Parameters…
| Name | var |
|---|---|
| Description | Integer, but in some other form (usually string). |
| Type | mixed |
| Name | base |
|---|---|
| Description | The base. |
| Default value | 10 |
| Type | integer |
Returns…
| Description | The integer, extracted. |
|---|---|
| Type | integer |
boolean is_a(object object, string class_name)
Whether the object is of this class or has this class as one of its parents.
Parameters…
| Name | object |
|---|---|
| Description | The object. |
| Type | object |
| Name | class_name |
|---|---|
| Description | The class name. |
| Type | string |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_array(mixed var)
Finds whether a variable is an array.
Parameters…
| Name | var |
|---|---|
| Description | What to check. |
| Type | mixed |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_bool(mixed var)
Finds whether a variable is a boolean.
Parameters…
| Name | var |
|---|---|
| Description | What to check. |
| Type | mixed |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_dir(PATH path)
Finds whether a path is to a directory.
Parameters…
| Name | path |
|---|---|
| Description | The path to check. |
| Type | PATH |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_file(PATH path)
Finds whether a path is to a file.
Parameters…
| Name | path |
|---|---|
| Description | The path to check. |
| Type | PATH |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_link(PATH path)
Finds whether a path is to a symbolic link.
Parameters…
| Name | path |
|---|---|
| Description | The path to check. |
| Type | PATH |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_float(mixed var)
Finds whether a variable is a float.
Parameters…
| Name | var |
|---|---|
| Description | What to check. |
| Type | mixed |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_integer(mixed var)
Finds whether a variable is an integer.
Parameters…
| Name | var |
|---|---|
| Description | What to check. |
| Type | mixed |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_callable(mixed var)
Finds whether a variable holds a callable function reference.
Parameters…
| Name | var |
|---|---|
| Description | What to check. |
| Type | mixed |
Returns…
| Description | Whether it does. |
|---|---|
| Type | boolean |
boolean is_null(mixed var)
Finds whether a variable is null.
Parameters…
| Name | var |
|---|---|
| Description | What to check. |
| Type | mixed |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_numeric(mixed var)
Finds whether a variable is numeric (e.g. a numeric string, or a pure integer).
Parameters…
| Name | var |
|---|---|
| Description | What to check. |
| Type | mixed |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_object(mixed var)
Finds whether a variable is an object.
Parameters…
| Name | var |
|---|---|
| Description | What to check. |
| Type | mixed |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_readable(PATH path)
Finds whether a path is to an actual readable file.
Parameters…
| Name | path |
|---|---|
| Description | The path to check. |
| Type | PATH |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_resource(mixed var)
Finds whether a variable is a resource.
Parameters…
| Name | var |
|---|---|
| Description | What to check. |
| Type | mixed |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_string(mixed var)
Finds whether a variable is a string.
Parameters…
| Name | var |
|---|---|
| Description | What to check. |
| Type | mixed |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_uploaded_file(PATH path)
Finds whether a path is to an actual uploaded file.
Parameters…
| Name | path |
|---|---|
| Description | The path to check. |
| Type | PATH |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_writable(PATH path)
Finds whether a path is to an actual writeable file.
Parameters…
| Name | path |
|---|---|
| Description | The path to check. |
| Type | PATH |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean isset(mixed path)
Finds whether a variable exists / is not null / is an actually derefereable array element. Do not use this for the null case, and otherwise ONLY when for efficiency reasons.
Parameters…
| Name | path |
|---|---|
| Description | The variable. |
| Type | mixed |
Returns…
| Description | Whether it is set. |
|---|---|
| Type | boolean |
void krsort(array array)
Sort an array by key in reverse order.
Parameters…
| Name | array |
|---|---|
| Description | The array to sort. |
| Type | array |
(No return value)
void ksort(array array)
Sort an array by key.
Parameters…
| Name | array |
|---|---|
| Description | The array to sort. |
| Type | array |
(No return value)
string ltrim(string string, string characters)
Strip whitespace from the beginning of a string.
Parameters…
| Name | string |
|---|---|
| Description | The string to trim from. |
| Type | string |
| Name | characters |
|---|---|
| Description | Characters to trim. |
| Default value | |
| Type | string |
Returns…
| Description | The trimmed string. |
|---|---|
| Type | string |
boolean mail(string to, string subject, string message, string additional_headers, string additional_flags)
Send an e-mail.
Parameters…
| Name | to |
|---|---|
| Description | The TO address. |
| Type | string |
| Name | subject |
|---|---|
| Description | The subject. |
| Type | string |
| Name | message |
|---|---|
| Description | The message. |
| Type | string |
| Name | additional_headers |
|---|---|
| Description | Additional headers. |
| Default value | |
| Type | string |
| Name | additional_flags |
|---|---|
| Description | Additional stuff to send to sendmail executable (if appropriate, only works when safe mode is off). |
| Default value | |
| Type | string |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
mixed max(mixed arg1, ?mixed arg2, ?mixed arg3, ?mixed arg4, ?mixed arg5, ?mixed arg6, ?mixed arg7, ?mixed arg8, ?mixed arg9, ?mixed arg10)
Find highest value between arguments.
Parameters…
| Name | arg1 |
|---|---|
| Description | First argument (if array, then each treated as a separate parameter). |
| Type | mixed |
| Name | arg2 |
|---|---|
| Description | Second argument (NULL: no second argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg3 |
|---|---|
| Description | Third argument (NULL: no third argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg4 |
|---|---|
| Description | Fourth argument (NULL: no fourth argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg5 |
|---|---|
| Description | Fifth argument (NULL: no fith argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg6 |
|---|---|
| Description | Sixth argument (NULL: no sixth argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg7 |
|---|---|
| Description | Seventh argument (NULL: no seventh argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg8 |
|---|---|
| Description | Eighth argument (NULL: no eighth argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg9 |
|---|---|
| Description | Ninth argument (NULL: no ninth argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg10 |
|---|---|
| Description | Tenth argument (NULL: no tenth argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
Returns…
| Description | The highest valued argument. |
|---|---|
| Type | mixed |
string md5(string str)
Calculate the md5 hash of a string.
Parameters…
| Name | str |
|---|---|
| Description | String to hash. |
| Type | string |
Returns…
| Description | Hashed result. |
|---|---|
| Type | string |
boolean method_exists(object object, string method_name)
Checks if the class method exists.
Parameters…
| Name | object |
|---|---|
| Description | Object of the class we want to check. |
| Type | object |
| Name | method_name |
|---|---|
| Description | The method name. |
| Type | string |
Returns…
| Description | Whether the class method exists. |
|---|---|
| Type | boolean |
string microtime(boolean as_float)
Return current UNIX timestamp with microseconds.
Parameters…
| Name | as_float |
|---|---|
| Description | Whether to return a float result. ALWAYS PASS THIS IN AS *FALSE* - FOR COMPATIBILITY WITH OLD VERSIONS OF PHP THAT DO NOT HAVE IT, WHILST PHP 6 DEFAULTS IT TO TRUE. |
| Type | boolean |
Returns…
| Description | Micro-time. |
|---|---|
| Type | string |
mixed min(mixed arg1, ?mixed arg2, ?mixed arg3, ?mixed arg4, ?mixed arg5, ?mixed arg6, ?mixed arg7, ?mixed arg8, ?mixed arg9, ?mixed arg10)
Find lowest value between arguments.
Parameters…
| Name | arg1 |
|---|---|
| Description | First argument (if array, then each treated as a separate parameter). |
| Type | mixed |
| Name | arg2 |
|---|---|
| Description | Second argument (NULL: no second argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg3 |
|---|---|
| Description | Third argument (NULL: no third argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg4 |
|---|---|
| Description | Fourth argument (NULL: no fourth argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg5 |
|---|---|
| Description | Fifth argument (NULL: no fith argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg6 |
|---|---|
| Description | Sixth argument (NULL: no sixth argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg7 |
|---|---|
| Description | Seventh argument (NULL: no seventh argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg8 |
|---|---|
| Description | Eighth argument (NULL: no eighth argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg9 |
|---|---|
| Description | Ninth argument (NULL: no ninth argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
| Name | arg10 |
|---|---|
| Description | Tenth argument (NULL: no tenth argument) (if array, then each treated as a separate parameter). |
| Default value | |
| Type | ?mixed |
Returns…
| Description | The lowest valued argument. |
|---|---|
| Type | mixed |
boolean mkdir(PATH path, integer mode)
{{creates-file}}}}
Parameters…
| Name | path |
|---|---|
| Description | The path to the directory to make. |
| Type | PATH |
| Name | mode |
|---|---|
| Description | The mode (e.g. 0777). |
| Type | integer |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
TIME mktime(integer hour, integer minute, integer second, ?integer month, ?integer day, ?integer year, integer is_dst)
Get UNIX timestamp for a componentialised date.
Parameters…
| Name | hour |
|---|---|
| Description | The hour. |
| Type | integer |
| Name | minute |
|---|---|
| Description | The minute. |
| Type | integer |
| Name | second |
|---|---|
| Description | The second. |
| Type | integer |
| Name | month |
|---|---|
| Description | The month (NULL: now). |
| Default value | |
| Type | ?integer |
| Name | day |
|---|---|
| Description | The day (NULL: now). |
| Default value | |
| Type | ?integer |
| Name | year |
|---|---|
| Description | The year (NULL: now). |
| Default value | |
| Type | ?integer |
| Name | is_dst |
|---|---|
| Description | Whether date is in DST (-1 meaning unknown/guess, 0 meaning no, 1 meaning yes). |
| Default value | -1 |
| Type | integer |
Returns…
| Description | The timestamp. |
|---|---|
| Type | TIME |
boolean move_uploaded_file(PATH filename, PATH destination)
{{creates-file}}}}
Parameters…
| Name | filename |
|---|---|
| Description | Filename to move (taken from tmpname element of $_FILES list entry). |
| Type | PATH |
| Name | destination |
|---|---|
| Description | Path to move file to (preferably containing filename component). |
| Type | PATH |
Returns…
| Description | The success status. |
|---|---|
| Type | boolean |
integer mt_getrandmax()
Get largest possible random value.
Parameters…
Returns…
| Description | The value. |
|---|---|
| Type | integer |
integer mt_rand(integer min, integer max)
Generate a better random value.
Parameters…
| Name | min |
|---|---|
| Description | Minimum value. |
| Type | integer |
| Name | max |
|---|---|
| Description | Maximum value. |
| Type | integer |
Returns…
| Description | Random value. |
|---|---|
| Type | integer |
void mt_srand(integer seed)
Seed the better random number generator.
Parameters…
| Name | seed |
|---|---|
| Description | The seed. |
| Type | integer |
(No return value)
string number_format(mixed number, integer decimals, string dec_point, string thousands_sep)
Format a number with grouped thousands.
Parameters…
| Name | number |
|---|---|
| Description | The number to format [integer or float] (technically always float because it could be larger than an integer, but that's ugly). |
| Type | mixed |
| Name | decimals |
|---|---|
| Description | The number of decimal fraction digits to show. |
| Default value | 0 |
| Type | integer |
| Name | dec_point |
|---|---|
| Description | The string to use as a decimal point. |
| Default value | . |
| Type | string |
| Name | thousands_sep |
|---|---|
| Description | The string to separate groups of 1000's with. |
| Default value | , |
| Type | string |
Returns…
| Description | The string formatted number. |
|---|---|
| Type | string |
boolean ob_end_clean()
Clean (erase) the output buffer and turn off output buffering.
Parameters…
Returns…
| Description | Success status (could fail if there is no buffer). |
|---|---|
| Type | boolean |
boolean ob_end_flush()
Flush (output and erase) the output buffer and turn off output buffering.
Parameters…
Returns…
| Description | Success status (could fail if there is no buffer). |
|---|---|
| Type | boolean |
~string ob_get_contents()
Return the contents of the output buffer .
Parameters…
Returns…
| Description | The buffer contents (false: no buffer). |
|---|---|
| Type | ~string |
~string ob_get_clean()
Return the contents of the output buffer and empty it. Not available on all PHP versions, do a version check before calling it.
Parameters…
Returns…
| Description | The buffer contents (false: no buffer). |
|---|---|
| Type | ~string |
boolean ob_start()
Turn on output buffering.
Parameters…
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
integer print(string octal_string)
Output something.
Parameters…
| Name | octal_string |
|---|---|
| Description | The string to output. |
| Type | string |
Returns…
| Description | The number '1', always |
|---|---|
| Type | integer |
integer octdec(string octal_string)
String representation of octal to decimal.
Parameters…
| Name | octal_string |
|---|---|
| Description | The string representation. |
| Type | string |
Returns…
| Description | The integer ('decimal' form, although truly stored in binary). |
|---|---|
| Type | integer |
~resource opendir(PATH path)
Open a directory for analysis.
Parameters…
| Name | path |
|---|---|
| Description | The path to the directory to open. |
| Type | PATH |
Returns…
| Description | The directory handle (false: error). |
|---|---|
| Type | ~resource |
integer ord(string string)
Return ASCII value of character.
Parameters…
| Name | string |
|---|---|
| Description | String of length 1, containing character to find ASCII value of. |
| Type | string |
Returns…
| Description | The ASCII value. |
|---|---|
| Type | integer |
string pack(string format, ?mixed arg1, ?mixed arg2, ?mixed arg3, ?mixed arg4, ?mixed arg5, ?mixed arg6, ?mixed arg7, ?mixed arg8, ?mixed arg9, ?mixed arg10, ?mixed arg11, ?mixed arg12, ?mixed arg13, ?mixed arg14, ?mixed arg15, ?mixed arg16, ?mixed arg17, ?mixed arg18, ?mixed arg19, ?mixed arg20, ?mixed arg21, ?mixed arg22, ?mixed arg23, ?mixed arg24, ?mixed arg25, ?mixed arg26, ?mixed arg27, ?mixed arg28, ?mixed arg29, ?mixed arg30)
Pack data into binary string.
Parameters…
| Name | format |
|---|---|
| Description | The formatting string. |
| Type | string |
| Name | arg1 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg2 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg3 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg4 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg5 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg6 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg7 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg8 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg9 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg10 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg11 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg12 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg13 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg14 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg15 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg16 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg17 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg18 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg19 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg20 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg21 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg22 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg23 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg24 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg25 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg26 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg27 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg28 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg29 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
| Name | arg30 |
|---|---|
| Description | Argument that binds to the formatting string (NULL: none). |
| Default value | |
| Type | ?mixed |
Returns…
| Description | The binary string. |
|---|---|
| Type | string |
~array parse_url(string url)
Parse a URL and return its components.
Parameters…
| Name | url |
|---|---|
| Description | The URL to parse. |
| Type | string |
Returns…
| Description | A map of details about the URL (false: URL cannot be parsed). |
|---|---|
| Type | ~array |
~array pathinfo(PATH path)
Returns information about a file path.
Parameters…
| Name | path |
|---|---|
| Description | The path to parse. |
| Type | PATH |
Returns…
| Description | A map of details about the path. (false: error) |
|---|---|
| Type | ~array |
void phpinfo()
Outputs lots of PHP information.
Parameters…
(No return value)
string phpversion()
Gets the current PHP version.
Parameters…
Returns…
| Description | The PHP version. |
|---|---|
| Type | string |
~array posix_getpwuid(integer uid)
Return info about a user by user id. Does not exist on Windows.
Parameters…
| Name | uid |
|---|---|
| Description | The user ID. |
| Type | integer |
Returns…
| Description | A map of details of the user. (false: failure) |
|---|---|
| Type | ~array |
integer posix_getuid()
Return the real user ID of the current process. Does not exist on Windows.
Parameters…
Returns…
| Description | User ID. |
|---|---|
| Type | integer |
~integer preg_match(string pattern, string subject, ?array matches, integer flags)
Perform a regular expression match.
Parameters…
| Name | pattern |
|---|---|
| Description | The pattern. |
| Type | string |
| Name | subject |
|---|---|
| Description | The subject string. |
| Type | string |
| Name | matches |
|---|---|
| Description | Where matches will be put (note that it is a list of maps, except the arrays are turned inside out). (NULL: do not store matches). Note that this is actually passed by reference, but is also optional. |
| Default value | |
| Type | ?array |
| Name | flags |
|---|---|
| Description | Either 0, or PREG_OFFSET_CAPTURE. |
| Default value | 0 |
| Type | integer |
Returns…
| Description | The number of matches (false: error). |
|---|---|
| Type | ~integer |
array preg_grep(string pattern, array subject, integer flags)
Array entries that match the pattern.
Parameters…
| Name | pattern |
|---|---|
| Description | The pattern. |
| Type | string |
| Name | subject |
|---|---|
| Description | The subject strings. |
| Type | array |
| Name | flags |
|---|---|
| Description | Either 0, or PREG_GREP_INVERT. |
| Default value | 0 |
| Type | integer |
Returns…
| Description | Matches |
|---|---|
| Type | array |
~integer preg_match_all(string pattern, string subject, array matches, integer flags)
Perform a global regular expression match.
Parameters…
| Name | pattern |
|---|---|
| Description | The pattern. |
| Type | string |
| Name | subject |
|---|---|
| Description | The subject string. |
| Type | string |
| Name | matches |
|---|---|
| Description | Where matches will be put (note that it is a list of maps, except the arrays are turned inside out). Note that this is actually passed by reference, but is also optional. |
| Type | array |
| Name | flags |
|---|---|
| Description | Either 0, or PREG_OFFSET_CAPTURE. |
| Default value | 0 |
| Type | integer |
Returns…
| Description | The number of matches (false: error). |
|---|---|
| Type | ~integer |
~string preg_replace(mixed pattern, mixed replacement, string subject, ?integer limit)
Perform a regular expression search and replace.
Parameters…
| Name | pattern |
|---|---|
| Description | The pattern (string or array). |
| Type | mixed |
| Name | replacement |
|---|---|
| Description | The replacement string (string or array). |
| Type | mixed |
| Name | subject |
|---|---|
| Description | The subject string. |
| Type | string |
| Name | limit |
|---|---|
| Description | The limit of replacements (NULL: no limit). |
| Default value | |
| Type | ?integer |
Returns…
| Description | The string with replacements made (false: error). |
|---|---|
| Type | ~string |
~string preg_replace_callback(string pattern, mixed callback, string subject, ?integer limit)
Perform a regular expression search and replace using a callback.
Parameters…
| Name | pattern |
|---|---|
| Description | The pattern. |
| Type | string |
| Name | callback |
|---|---|
| Description | The callback. |
| Type | mixed |
| Name | subject |
|---|---|
| Description | The subject string. |
| Type | string |
| Name | limit |
|---|---|
| Description | The limit of replacements (NULL: no limit). |
| Default value | |
| Type | ?integer |
Returns…
| Description | The string with replacements made (false: error). |
|---|---|
| Type | ~string |
array preg_split(string pattern, string subject, ?integer max_splits, ?integer mode)
Split string by a regular expression.
Parameters…
| Name | pattern |
|---|---|
| Description | The pattern. |
| Type | string |
| Name | subject |
|---|---|
| Description | The subject. |
| Type | string |
| Name | max_splits |
|---|---|
| Description | The maximum number of splits to make (NULL: no limit). |
| Default value | |
| Type | ?integer |
| Name | mode |
|---|---|
| Description | The special mode (NULL: none). |
| Default value | |
| Type | ?integer |
Returns…
| Description | The array due to splitting. |
|---|---|
| Type | array |
void print_r(mixed data)
Prints human-readable information about a variable.
Parameters…
| Name | data |
|---|---|
| Description | The variable. |
| Type | mixed |
(No return value)
boolean putenv(string string)
Sets the value of an environment variable.
Parameters…
| Name | string |
|---|---|
| Description | The string to send over (e.g. PATH=foo). |
| Type | string |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
string rawurldecode(string str)
Decode URL-encoded strings.
Parameters…
| Name | str |
|---|---|
| Description | The string to decode. |
| Type | string |
Returns…
| Description | Decoded string. |
|---|---|
| Type | string |
string rawurlencode(string str)
Encode URL-encoded strings.
Parameters…
| Name | str |
|---|---|
| Description | The string to encode. |
| Type | string |
Returns…
| Description | Encoded string. |
|---|---|
| Type | string |
~string readdir(resource dir_handle)
Read entry from directory handle.
Parameters…
| Name | dir_handle |
|---|---|
| Description | Handle. |
| Type | resource |
Returns…
| Description | Next filename (false: reached end already). |
|---|---|
| Type | ~string |
PATH realpath(PATH path)
Returns canonicalized absolute pathname.
Parameters…
| Name | path |
|---|---|
| Description | (Possibly) perceived path. |
| Type | PATH |
Returns…
| Description | Actual path. |
|---|---|
| Type | PATH |
void register_shutdown_function(mixed callback, ?mixed parama, ?mixed paramb, ?mixed paramc, ?mixed paramd, ?mixed parame, ?mixed paramf, ?mixed paramg, ?mixed paramh, ?mixed parami, ?mixed paramj, ?mixed paramk)
Register a function for execution on shutdown.
Parameters…
| Name | callback |
|---|---|
| Description | Callback. |
| Type | mixed |
| Name | parama |
|---|---|
| Description | Parameter (NULL: not used). |
| Default value | |
| Type | ?mixed |
| Name | paramb |
|---|---|
| Description | Parameter (NULL: not used). |
| Default value | |
| Type | ?mixed |
| Name | paramc |
|---|---|
| Description | Parameter (NULL: not used). |
| Default value | |
| Type | ?mixed |
| Name | paramd |
|---|---|
| Description | Parameter (NULL: not used). |
| Default value | |
| Type | ?mixed |
| Name | parame |
|---|---|
| Description | Parameter (NULL: not used). |
| Default value | |
| Type | ?mixed |
| Name | paramf |
|---|---|
| Description | Parameter (NULL: not used). |
| Default value | |
| Type | ?mixed |
| Name | paramg |
|---|---|
| Description | Parameter (NULL: not used). |
| Default value | |
| Type | ?mixed |
| Name | paramh |
|---|---|
| Description | Parameter (NULL: not used). |
| Default value | |
| Type | ?mixed |
| Name | parami |
|---|---|
| Description | Parameter (NULL: not used). |
| Default value | |
| Type | ?mixed |
| Name | paramj |
|---|---|
| Description | Parameter (NULL: not used). |
| Default value | |
| Type | ?mixed |
| Name | paramk |
|---|---|
| Description | Parameter (NULL: not used). |
| Default value | |
| Type | ?mixed |
(No return value)
boolean rename(PATH oldname, PATH newname)
Renames a file.
Parameters…
| Name | oldname |
|---|---|
| Description | Old name. |
| Type | PATH |
| Name | newname |
|---|---|
| Description | New name. |
| Type | PATH |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
mixed require(PATH filename)
Require and evaluate the specified file (dies with error if it can not).
Parameters…
| Name | filename |
|---|---|
| Description | The filename of the file to require. |
| Type | PATH |
Returns…
| Description | Success status or returned value. |
|---|---|
| Type | mixed |
mixed require_once(PATH filename)
Require and evaluate the specified file (dies with error if it can not), but only if it has not been loaded already.
Parameters…
| Name | filename |
|---|---|
| Description | The filename of the file to require. |
| Type | PATH |
Returns…
| Description | Success status or returned value. |
|---|---|
| Type | mixed |
mixed reset(array array)
Set the internal pointer of an array to its first element.
Parameters…
| Name | array |
|---|---|
| Description | The array. |
| Type | array |
Returns…
| Description | The value of the first element. |
|---|---|
| Type | mixed |
boolean rmdir(PATH dirname)
Removes directory.
Parameters…
| Name | dirname |
|---|---|
| Description | Directory path. |
| Type | PATH |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
float round(float val, integer precision)
Rounds a float.
Parameters…
| Name | val |
|---|---|
| Description | Value to round. |
| Type | float |
| Name | precision |
|---|---|
| Description | Number of decimal points of precision required (-ve allowed). |
| Default value | 0 |
| Type | integer |
Returns…
| Description | Rounded value. |
|---|---|
| Type | float |
void rsort(array array)
Sort an array in reverse order.
Parameters…
| Name | array |
|---|---|
| Description | The array to sort. |
| Type | array |
(No return value)
string rtrim(string str, string characters)
Strip whitespace from the end of a string.
Parameters…
| Name | str |
|---|---|
| Description | String to trim from. |
| Type | string |
| Name | characters |
|---|---|
| Description | Characters to trim. |
| Default value | |
| Type | string |
Returns…
| Description | Trimmed string. |
|---|---|
| Type | string |
string serialize(mixed value)
Generates a storable representation of a value.
Parameters…
| Name | value |
|---|---|
| Description | Whatever is to be serialised . |
| Type | mixed |
Returns…
| Description | The serialisation. |
|---|---|
| Type | string |
mixed set_error_handler(mixed error_handler)
Sets a user-defined error handler function.
Parameters…
| Name | error_handler |
|---|---|
| Description | The call back. |
| Type | mixed |
Returns…
| Description | The previously defined error handler. |
|---|---|
| Type | mixed |
boolean setcookie(string name, ?string value, ?integer expire, ?string path, ?string domain, BINARY secure)
Send a cookie.
Parameters…
| Name | name |
|---|---|
| Description | The name. |
| Type | string |
| Name | value |
|---|---|
| Description | The value (NULL: unset existing cookie). |
| Default value | |
| Type | ?string |
| Name | expire |
|---|---|
| Description | Expiration timestamp (NULL: session cookie). |
| Default value | |
| Type | ?integer |
| Name | path |
|---|---|
| Description | Path (NULL: current URL path). |
| Default value | |
| Type | ?string |
| Name | domain |
|---|---|
| Description | Domain (NULL: current URL domain). |
| Default value | |
| Type | ?string |
| Name | secure |
|---|---|
| Description | Whether the cookie is only for HTTPS. |
| Default value | 0 |
| Type | BINARY |
Returns…
| Description | Success status (fails if output already started). |
|---|---|
| Type | boolean |
~string shell_exec(string command)
Execute command via shell and return complete output as string.
Parameters…
| Name | command |
|---|---|
| Description | The command. |
| Type | string |
Returns…
| Description | The output (false: error). |
|---|---|
| Type | ~string |
string escapeshellcmd(string arg)
Prepare a command path for a shell call to it.
Parameters…
| Name | arg |
|---|---|
| Description | The command. |
| Type | string |
Returns…
| Description | Escaped. |
|---|---|
| Type | string |
string escapeshellarg(string arg)
Prepare an argument for use literally in a command.
Parameters…
| Name | arg |
|---|---|
| Description | The argument. |
| Type | string |
Returns…
| Description | Escaped. |
|---|---|
| Type | string |
float sin(float arg)
Calculate the sine of an angle.
Parameters…
| Name | arg |
|---|---|
| Description | The angle. |
| Type | float |
Returns…
| Description | The sine of the angle. |
|---|---|
| Type | float |
void sort(array array)
Sort an array.
Parameters…
| Name | array |
|---|---|
| Description | The array. |
| Type | array |
(No return value)
string sprintf(string format, ?mixed arg1, ?mixed arg2, ?mixed arg3, ?mixed arg4, ?mixed arg5, ?mixed arg6, ?mixed arg7, ?mixed arg8)
Return a formatted string.
Parameters…
| Name | format |
|---|---|
| Description | Formatting string. |
| Type | string |
| Name | arg1 |
|---|---|
| Description | Argument for the formatting string (NULL: none required). |
| Default value | |
| Type | ?mixed |
| Name | arg2 |
|---|---|
| Description | Argument for the formatting string (NULL: none required). |
| Default value | |
| Type | ?mixed |
| Name | arg3 |
|---|---|
| Description | Argument for the formatting string (NULL: none required). |
| Default value | |
| Type | ?mixed |
| Name | arg4 |
|---|---|
| Description | Argument for the formatting string (NULL: none required). |
| Default value | |
| Type | ?mixed |
| Name | arg5 |
|---|---|
| Description | Argument for the formatting string (NULL: none required). |
| Default value | |
| Type | ?mixed |
| Name | arg6 |
|---|---|
| Description | Argument for the formatting string (NULL: none required). |
| Default value | |
| Type | ?mixed |
| Name | arg7 |
|---|---|
| Description | Argument for the formatting string (NULL: none required). |
| Default value | |
| Type | ?mixed |
| Name | arg8 |
|---|---|
| Description | Argument for the formatting string (NULL: none required). |
| Default value | |
| Type | ?mixed |
Returns…
| Description | Formatted string. |
|---|---|
| Type | string |
void srand(integer seed)
Seed the random number generator.
Parameters…
| Name | seed |
|---|---|
| Description | The seed. |
| Type | integer |
(No return value)
string str_pad(string input, integer pad_length, string pad_string, integer pad_type)
Pad a string to a certain length with another string.
Parameters…
| Name | input |
|---|---|
| Description | The subject. |
| Type | string |
| Name | pad_length |
|---|---|
| Description | The length to pad up to. |
| Type | integer |
| Name | pad_string |
|---|---|
| Description | What we are padding with. |
| Default value | |
| Type | string |
| Name | pad_type |
|---|---|
| Description | The padding type (STR_PAD_RIGHT, STR_PAD_LEFT, STR_PAD_BOTH). |
| Default value | 1 |
| Type | integer |
Returns…
| Description | The result. |
|---|---|
| Type | string |
string str_repeat(string input, integer multiplier)
Repeat a string.
Parameters…
| Name | input |
|---|---|
| Description | The string to repeat. |
| Type | string |
| Name | multiplier |
|---|---|
| Description | How many times to repeat the string. |
| Type | integer |
Returns…
| Description | The result. |
|---|---|
| Type | string |
mixed str_replace(mixed search, mixed replace, mixed subject)
Replace all occurrences of the search string with the replacement string.
Parameters…
| Name | search |
|---|---|
| Description | What's being replaced (string or array). |
| Type | mixed |
| Name | replace |
|---|---|
| Description | What's being replaced with (string or array). |
| Type | mixed |
| Name | subject |
|---|---|
| Description | Subject (string or array). |
| Type | mixed |
Returns…
| Description | Result (string or array). |
|---|---|
| Type | mixed |
integer strcmp(string str1, string str2)
Binary safe string comparison.
Parameters…
| Name | str1 |
|---|---|
| Description | The first string. |
| Type | string |
| Name | str2 |
|---|---|
| Description | The second string. |
| Type | string |
Returns…
| Description | <0 if s1<s2, 0 if s1=s2, >1 if s1>s2. |
|---|---|
| Type | integer |
string strftime(string format, ?TIME timestamp)
Format a local time/date according to locale settings (uses alternative formatting to 'date' function).
Parameters…
| Name | format |
|---|---|
| Description | The formatting string. |
| Type | string |
| Name | timestamp |
|---|---|
| Description | The timestamp (NULL: now). |
| Default value | |
| Type | ?TIME |
Returns…
| Description | The formatted string. |
|---|---|
| Type | string |
string strip_tags(string str, string allowable_tags)
Strip HTML and PHP tags from a string.
Parameters…
| Name | str |
|---|---|
| Description | Subject. |
| Type | string |
| Name | allowable_tags |
|---|---|
| Description | Comma-separated list of allowable tags. |
| Default value | |
| Type | string |
Returns…
| Description | Result. |
|---|---|
| Type | string |
string addslashes(string str)
Quote string for encapsulation in a written string data type.
Parameters…
| Name | str |
|---|---|
| Description | Unslashed string. |
| Type | string |
Returns…
| Description | Slashed string. |
|---|---|
| Type | string |
string stripslashes(string str)
Un-quote string slashed with addslashes.
Parameters…
| Name | str |
|---|---|
| Description | Slashed string. |
| Type | string |
Returns…
| Description | Unslashed string. |
|---|---|
| Type | string |
integer strlen(string str)
Get string length.
Parameters…
| Name | str |
|---|---|
| Description | The string to get the length of. |
| Type | string |
Returns…
| Description | The string length. |
|---|---|
| Type | integer |
~integer strpos(string haystack, string needle, integer offset)
Find position of first occurrence of a string.
Parameters…
| Name | haystack |
|---|---|
| Description | Haystack. |
| Type | string |
| Name | needle |
|---|---|
| Description | Needle. |
| Type | string |
| Name | offset |
|---|---|
| Description | Offset to search from. |
| Default value | 0 |
| Type | integer |
Returns…
| Description | The offset it is found at (false: not found). |
|---|---|
| Type | ~integer |
~integer strrpos(string haystack, string needle)
Find position of last occurrence of a char in a string.
Parameters…
| Name | haystack |
|---|---|
| Description | Haystack. |
| Type | string |
| Name | needle |
|---|---|
| Description | Needle. |
| Type | string |
Returns…
| Description | The offset it is found at (false: not found). |
|---|---|
| Type | ~integer |
~string strstr(string haystack, string needle)
Find first occurrence of a string.
Parameters…
| Name | haystack |
|---|---|
| Description | Haystack. |
| Type | string |
| Name | needle |
|---|---|
| Description | Needle. |
| Type | string |
Returns…
| Description | The answer (false: does not occur). |
|---|---|
| Type | ~string |
~string strtok(string subject, ?string deliminators)
Tokenize string.
Parameters…
| Name | subject |
|---|---|
| Description | String to tokenise. EXCEPT if $deliminators=NULL, then this has actual deliminators. |
| Type | string |
| Name | deliminators |
|---|---|
| Description | Deliminators (NULL: continue with previous tokenisation). |
| Default value | |
| Type | ?string |
Returns…
| Description | Next token (false: could not return a token, no more tokens to return). |
|---|---|
| Type | ~string |
string strtolower(string str)
Make a string lowercase.
Parameters…
| Name | str |
|---|---|
| Description | Subject. |
| Type | string |
Returns…
| Description | Result. |
|---|---|
| Type | string |
TIME strtotime(string time, ?TIME now)
Parse about any English textual datetime description into a UNIX timestamp.
Parameters…
| Name | time |
|---|---|
| Description | The subject. |
| Type | string |
| Name | now |
|---|---|
| Description | The timestamp to find times relative to (NULL: now). |
| Default value | |
| Type | ?TIME |
Returns…
| Description | The timetamp (-1: failed). |
|---|---|
| Type | TIME |
string strtoupper(string str)
Make a string uppercase.
Parameters…
| Name | str |
|---|---|
| Description | Subject. |
| Type | string |
Returns…
| Description | Result. |
|---|---|
| Type | string |
string strtr(string string, mixed replace_pairs, ?mixed to)
Translate certain characters.
Parameters…
| Name | string |
|---|---|
| Description | Subject. |
| Type | string |
| Name | replace_pairs |
|---|---|
| Description | Map of translations to do OR from string. |
| Type | mixed |
| Name | to |
|---|---|
| Description | To string (NULL: previous parameter was a map). |
| Default value | |
| Type | ?mixed |
Returns…
| Description | Result. |
|---|---|
| Type | string |
string strval(mixed var)
Get string value of a variable.
Parameters…
| Name | var |
|---|---|
| Description | The variable. |
| Type | mixed |
Returns…
| Description | String value of the variable. |
|---|---|
| Type | string |
~string substr(string string, integer start, ?integer length)
Return part of a string.
Parameters…
| Name | string |
|---|---|
| Description | The subject. |
| Type | string |
| Name | start |
|---|---|
| Description | The start position. |
| Type | integer |
| Name | length |
|---|---|
| Description | The length to extract (NULL: all remaining). |
| Default value | |
| Type | ?integer |
Returns…
| Description | String part (false: $start was over the end of the string). |
|---|---|
| Type | ~string |
integer substr_count(string haystack, string needle)
Count the number of substring occurrences.
Parameters…
| Name | haystack |
|---|---|
| Description | The subject. |
| Type | string |
| Name | needle |
|---|---|
| Description | The substring to search for in the subject. |
| Type | string |
Returns…
| Description | The number of times substring occurs in the subject. |
|---|---|
| Type | integer |
~string tempnam(PATH dir, string prefix)
{{creates-file}}}}
Parameters…
| Name | dir |
|---|---|
| Description | The directory to create in (empty for temp directory). |
| Type | PATH |
| Name | prefix |
|---|---|
| Description | The prefix of the temporary file name. |
| Type | string |
Returns…
| Description | The name of the temporary file (false: error). |
|---|---|
| Type | ~string |
TIME time()
Return current UNIX timestamp.
Parameters…
Returns…
| Description | The timestamp. |
|---|---|
| Type | TIME |
string trim(string str, string characters)
Strip whitespace from both ends of a string.
Parameters…
| Name | str |
|---|---|
| Description | String to trim from. |
| Type | string |
| Name | characters |
|---|---|
| Description | Characters to trim. |
| Default value | |
| Type | string |
Returns…
| Description | Trimmed string. |
|---|---|
| Type | string |
void trigger_error(string error_msg, integer error_type)
Generates a user-level error/warning/notice message.
Parameters…
| Name | error_msg |
|---|---|
| Description | The error message. |
| Type | string |
| Name | error_type |
|---|---|
| Description | The PHP error type constant. |
| Type | integer |
(No return value)
void uasort(array array, mixed cmp_function)
Sort an array with a user-defined comparison function and maintain index association.
Parameters…
| Name | array |
|---|---|
| Description | The array. |
| Type | array |
| Name | cmp_function |
|---|---|
| Description | Comparison function. |
| Type | mixed |
(No return value)
string ucfirst(string str)
Make a string's first character uppercase.
Parameters…
| Name | str |
|---|---|
| Description | Subject. |
| Type | string |
Returns…
| Description | Result. |
|---|---|
| Type | string |
string ucwords(string str)
Uppercase the first character of each word in a string.
Parameters…
| Name | str |
|---|---|
| Description | Subject. |
| Type | string |
Returns…
| Description | Result. |
|---|---|
| Type | string |
void uksort(array array, mixed cmp_function)
Sort an array by keys using a user-defined comparison function.
Parameters…
| Name | array |
|---|---|
| Description | The array. |
| Type | array |
| Name | cmp_function |
|---|---|
| Description | Comparison function. |
| Type | mixed |
(No return value)
string uniqid(string prefix, boolean lcg)
Generate a unique ID.
Parameters…
| Name | prefix |
|---|---|
| Description | Prefix for unique ID. |
| Type | string |
| Name | lcg |
|---|---|
| Description | Whether to add additional "combined LCG" entropy at the end of the return value. |
| Default value | boolean-false |
| Type | boolean |
Returns…
| Description | Unique ID. |
|---|---|
| Type | string |
boolean unlink(PATH filename)
Deletes a file.
Parameters…
| Name | filename |
|---|---|
| Description | The filename. |
| Type | PATH |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
~mixed unserialize(string str)
Creates a PHP value from a stored representation.
Parameters…
| Name | str |
|---|---|
| Description | Serialized string. |
| Type | string |
Returns…
| Description | What was originally serialised (false: bad data given, or actually false was serialized). |
|---|---|
| Type | ~mixed |
void unset(mixed var)
Unset a given variable.
Parameters…
| Name | var |
|---|---|
| Description | Unset this. |
| Type | mixed |
(No return value)
string urldecode(string str)
Decodes URL-encoded string.
Parameters…
| Name | str |
|---|---|
| Description | URL encoded string. |
| Type | string |
Returns…
| Description | Pure string. |
|---|---|
| Type | string |
string urlencode(string str)
URL-encodes string.
Parameters…
| Name | str |
|---|---|
| Description | The pure string to URL encode. |
| Type | string |
Returns…
| Description | URL encoded string. |
|---|---|
| Type | string |
void usort(array array, mixed cmp_function)
Sort an array by values using a user-defined comparison function.
Parameters…
| Name | array |
|---|---|
| Description | The array. |
| Type | array |
| Name | cmp_function |
|---|---|
| Description | Comparison function. |
| Type | mixed |
(No return value)
string utf8_decode(string data)
Converts a string with ISO-8859-1 characters encoded with UTF-8 to single-byte ISO-8859-1.
Parameters…
| Name | data |
|---|---|
| Description | Subject. |
| Type | string |
Returns…
| Description | Result. |
|---|---|
| Type | string |
string utf8_encode(string data)
Encodes an ISO-8859-1 string to UTF-8.
Parameters…
| Name | data |
|---|---|
| Description | Subject. |
| Type | string |
Returns…
| Description | Result. |
|---|---|
| Type | string |
string wordwrap(string string, integer width, string break, boolean cut)
Wraps a string to a given number of characters using a string break character.
Parameters…
| Name | string |
|---|---|
| Description | Subject. |
| Type | string |
| Name | width |
|---|---|
| Description | The word wrap position. |
| Default value | 75 |
| Type | integer |
| Name | break |
|---|---|
| Description | The string to put at wrap points. |
| Default value | |
| Type | string |
| Name | cut |
|---|---|
| Description | Whether to cut up words. |
| Default value | boolean-false |
| Type | boolean |
Returns…
| Description | Word-wrapped string. |
|---|---|
| Type | string |
void xdebug_dump_function_profile(integer type)
Xdebug: dump profiling information.
Parameters…
| Name | type |
|---|---|
| Description | The dump mode |
| Type | integer |
(No return value)
void xdebug_start_profiling()
Xdebug: start profiling.
Parameters…
(No return value)
string xml_error_string(integer code)
Get XML parser error string for a certain error code.
Parameters…
| Name | code |
|---|---|
| Description | Error code. |
| Type | integer |
Returns…
| Description | The string representation of the error code given. |
|---|---|
| Type | string |
~integer xml_get_current_byte_index(resource parser)
Get current byte index for an XML parser.
Parameters…
| Name | parser |
|---|---|
| Description | XML parser. |
| Type | resource |
Returns…
| Description | Byte index (false: invalid parser given). |
|---|---|
| Type | ~integer |
~integer xml_get_current_line_number(resource parser)
Get current line number for an XML parser.
Parameters…
| Name | parser |
|---|---|
| Description | XML parser. |
| Type | resource |
Returns…
| Description | Line number (false: invalid parser given). |
|---|---|
| Type | ~integer |
integer xml_get_error_code(resource parser)
Get XML parser error code for last error the occurred.
Parameters…
| Name | parser |
|---|---|
| Description | XML parser. |
| Type | resource |
Returns…
| Description | The error code. |
|---|---|
| Type | integer |
BINARY xml_parse(resource parser, string data, boolean is_final)
Start parsing an XML document.
Parameters…
| Name | parser |
|---|---|
| Description | XML parser. |
| Type | resource |
| Name | data |
|---|---|
| Description | The data to parse. |
| Type | string |
| Name | is_final |
|---|---|
| Description | Finish parsing process with this piece of data (otherwise parsing is open to re-enter with more data). |
| Default value | boolean-false |
| Type | boolean |
Returns…
| Description | Success status. |
|---|---|
| Type | BINARY |
boolean xml_parser_free(resource parser)
Free an XML parser.
Parameters…
| Name | parser |
|---|---|
| Description | XML parser. |
| Type | resource |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean xml_parser_set_option(resource parser, integer option, mixed value)
Set options in an XML parser.
Parameters…
| Name | parser |
|---|---|
| Description | XML parser. |
| Type | resource |
| Name | option |
|---|---|
| Description | The option to set (XML_OPTION_CASE_FOLDING [integer], XML_OPTION_TARGET_ENCODING [string]). |
| Type | integer |
| Name | value |
|---|---|
| Description | The value (BINARY or string). |
| Type | mixed |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean xml_set_character_data_handler(resource parser, mixed handler)
Set up character data handler.
Parameters…
| Name | parser |
|---|---|
| Description | XML parser. |
| Type | resource |
| Name | handler |
|---|---|
| Description | The callback. |
| Type | mixed |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean xml_set_element_handler(resource parser, mixed start_handler, mixed end_handler)
Set up start and end element handlers.
Parameters…
| Name | parser |
|---|---|
| Description | XML parser. |
| Type | resource |
| Name | start_handler |
|---|---|
| Description | The callback for start of element. |
| Type | mixed |
| Name | end_handler |
|---|---|
| Description | The callback for end of element. |
| Type | mixed |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
void xml_set_object(resource parser, object object)
Use XML Parser within an object.
Parameters…
| Name | parser |
|---|---|
| Description | XML parser. |
| Type | resource |
| Name | object |
|---|---|
| Description | The object. |
| Type | object |
(No return value)
string xmlrpc_encode_request(string method, array params)
Generates XML for a method request.
Parameters…
| Name | method |
|---|---|
| Description | The method to call. |
| Type | string |
| Name | params |
|---|---|
| Description | The parameters to use. |
| Type | array |
Returns…
| Description | The XML. |
|---|---|
| Type | string |
float acos(float arg)
Arc cosine.
Parameters…
| Name | arg |
|---|---|
| Description | Argument. |
| Type | float |
Returns…
| Description | Angle. |
|---|---|
| Type | float |
mixed array_rand(array input, integer num_req)
Pick one or more random entries out of an array.
Parameters…
| Name | input |
|---|---|
| Description | Array to choose from. |
| Type | array |
| Name | num_req |
|---|---|
| Description | Number of entries required. |
| Default value | 1 |
| Type | integer |
Returns…
| Description | Random entry, or array of random entries if $num_req!=1. |
|---|---|
| Type | mixed |
void array_unshift(array array, mixed var)
Prepend one or more elements to the beginning of array.
Parameters…
| Name | array |
|---|---|
| Description | Array to prepend to. |
| Type | array |
| Name | var |
|---|---|
| Description | Element to prepend. |
| Type | mixed |
(No return value)
float asin(float arg)
Arc sine.
Parameters…
| Name | arg |
|---|---|
| Description | Argument. |
| Type | float |
Returns…
| Description | Angle. |
|---|---|
| Type | float |
float atan(float num)
Arc tan.
Parameters…
| Name | num |
|---|---|
| Description | Argument. |
| Type | float |
Returns…
| Description | Angle. |
|---|---|
| Type | float |
string base_convert(string number, integer frombase, integer tobase)
Convert a number between arbitrary bases (string representations).
Parameters…
| Name | number |
|---|---|
| Description | The string representation number to convert. |
| Type | string |
| Name | frombase |
|---|---|
| Description | From base. |
| Type | integer |
| Name | tobase |
|---|---|
| Description | To base. |
| Type | integer |
Returns…
| Description | New base representation. |
|---|---|
| Type | string |
string basename(PATH path, string ext)
Returns filename component of path.
Parameters…
| Name | path |
|---|---|
| Description | Path. |
| Type | PATH |
| Name | ext |
|---|---|
| Description | File extension to cut off (blank: none). |
| Default value | |
| Type | string |
Returns…
| Description | File name component. |
|---|---|
| Type | string |
integer bindec(string binary_string)
Binary (string representation) to decimal (integer).
Parameters…
| Name | binary_string |
|---|---|
| Description | Binary in string form. |
| Type | string |
Returns…
| Description | Number. |
|---|---|
| Type | integer |
mixed call_user_func_array(mixed callback, array parameters)
Call a user function given with an array of parameters.
Parameters…
| Name | callback |
|---|---|
| Description | Callback. |
| Type | mixed |
| Name | parameters |
|---|---|
| Description | Parameters. |
| Type | array |
Returns…
| Description | Whatever the function returned. |
|---|---|
| Type | mixed |
integer crc32(string str)
Calculates the crc32 polynomial of a string.
Parameters…
| Name | str |
|---|---|
| Description | The string to get the CRC32 of. |
| Type | string |
Returns…
| Description | The CRC32. |
|---|---|
| Type | integer |
string decbin(integer number)
Decimal (integer) to binary (string representation).
Parameters…
| Name | number |
|---|---|
| Description | Decimal. |
| Type | integer |
Returns…
| Description | String representation of binary number. |
|---|---|
| Type | string |
array each(array array)
Return the current key and value pair from an array and advance the array cursor.
Parameters…
| Name | array |
|---|---|
| Description | Array we're progressing through. |
| Type | array |
Returns…
| Description | (key, value) pair. |
|---|---|
| Type | array |
boolean empty(mixed var)
Determine whether a variable is empty (empty being defined differently for different types).
Parameters…
| Name | var |
|---|---|
| Description | Input. |
| Type | mixed |
Returns…
| Description | Whether it is CONSIDERED empty. |
|---|---|
| Type | boolean |
mixed end(array array)
Set the internal pointer of an array to its last element.
Parameters…
| Name | array |
|---|---|
| Description | The array. |
| Type | array |
Returns…
| Description | Value of the last element. |
|---|---|
| Type | mixed |
boolean fflush(resource handle)
Flushes the output to a file.
Parameters…
| Name | handle |
|---|---|
| Description | The file handle to flush. |
| Type | resource |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
~TIME fileatime(PATH filename)
Gets last access time of file.
Parameters…
| Name | filename |
|---|---|
| Description | The filename. |
| Type | PATH |
Returns…
| Description | Timestamp of last access (false: error). |
|---|---|
| Type | ~TIME |
boolean flock(resource handle, integer operation)
Portable advisory file locking.
Parameters…
| Name | handle |
|---|---|
| Description | File handle. |
| Type | resource |
| Name | operation |
|---|---|
| Description | Operation (LOCK_SH, LOCK_EX, LOCK_UN). |
| Type | integer |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
void flush()
Flush the output buffer.
Parameters…
(No return value)
string get_current_user()
Gets the name of the owner of the current PHP script.
Parameters…
Returns…
| Description | Name. |
|---|---|
| Type | string |
string gethostbyaddr(string ip_address)
Get the Internet host name corresponding to a given IP address.
Parameters…
| Name | ip_address |
|---|---|
| Description | IP address. |
| Type | string |
Returns…
| Description | Host name OR IP address if failed to look up. |
|---|---|
| Type | string |
string gethostbyname(string hostname)
Get the IP address corresponding to a given Internet host name.
Parameters…
| Name | hostname |
|---|---|
| Description | Host name. |
| Type | string |
Returns…
| Description | IP address OR host name if failed to look up. |
|---|---|
| Type | string |
integer getrandmax()
Get largest possible random value.
Parameters…
Returns…
| Description | Largest possible random value. |
|---|---|
| Type | integer |
integer gmmktime(integer hour, integer minute, integer second, integer month, integer day, integer year, integer is_dst)
Get UNIX timestamp for a GMT date.
Parameters…
| Name | hour |
|---|---|
| Description | The hour. |
| Type | integer |
| Name | minute |
|---|---|
| Description | The minute. |
| Type | integer |
| Name | second |
|---|---|
| Description | The second. |
| Type | integer |
| Name | month |
|---|---|
| Description | The month. |
| Type | integer |
| Name | day |
|---|---|
| Description | The day. |
| Type | integer |
| Name | year |
|---|---|
| Description | The year. |
| Type | integer |
| Name | is_dst |
|---|---|
| Description | Whether date is in DST (-1 meaning unknown/guess, 0 meaning no, 1 meaning yes). |
| Default value | -1 |
| Type | integer |
Returns…
| Description | The timestamp. |
|---|---|
| Type | integer |
string gmstrftime(string format, ?TIME timestamp)
Format a GMT/UTC time/date according to locale settings.
Parameters…
| Name | format |
|---|---|
| Description | The formatting string. |
| Type | string |
| Name | timestamp |
|---|---|
| Description | The timestamp (NULL: now). |
| Default value | |
| Type | ?TIME |
Returns…
| Description | The formatted string. |
|---|---|
| Type | string |
~integer ip2long(string ip_address)
Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address.
Parameters…
| Name | ip_address |
|---|---|
| Description | The IP address. |
| Type | string |
Returns…
| Description | The long form (false: cannot perform conversion). |
|---|---|
| Type | ~integer |
mixed key(array array)
Fetch a key from an associative array.
Parameters…
| Name | array |
|---|---|
| Description | The array. |
| Type | array |
Returns…
| Description | The index element of the current array position. |
|---|---|
| Type | mixed |
float log(float arg)
Natural logarithm.
Parameters…
| Name | arg |
|---|---|
| Description | Number to find log of. |
| Type | float |
Returns…
| Description | Log of given number. |
|---|---|
| Type | float |
float log10(float arg)
Base-10 logarithm.
Parameters…
| Name | arg |
|---|---|
| Description | Number to find log of. |
| Type | float |
Returns…
| Description | Log of given number. |
|---|---|
| Type | float |
integer long2ip(string proper_address)
Converts an (IPv4) Internet network address into a string in Internet standard dotted format.
Parameters…
| Name | proper_address |
|---|---|
| Description | The IP address. |
| Type | string |
Returns…
| Description | The long form. |
|---|---|
| Type | integer |
mixed next(array array)
Advance the internal array pointer of an array.
Parameters…
| Name | array |
|---|---|
| Description | The array. |
| Type | array |
Returns…
| Description | The array value we're now pointing at. |
|---|---|
| Type | mixed |
float pi()
Get value of PI.
Parameters…
Returns…
| Description | PI. |
|---|---|
| Type | float |
float pow(float base, float exp)
Exponential expression.
Parameters…
| Name | base |
|---|---|
| Description | Base. |
| Type | float |
| Name | exp |
|---|---|
| Description | Exponent. |
| Type | float |
Returns…
| Description | Result. |
|---|---|
| Type | float |
string preg_quote(string str)
Quote regular expression characters.
Parameters…
| Name | str |
|---|---|
| Description | The string to escape. |
| Type | string |
Returns…
| Description | The escape string. |
|---|---|
| Type | string |
mixed prev(array array)
Rewind the internal array pointer.
Parameters…
| Name | array |
|---|---|
| Description | The array. |
| Type | array |
Returns…
| Description | The array value we're now pointing at. |
|---|---|
| Type | mixed |
float rad2deg(float number)
Converts the radian number to the equivalent number in degrees.
Parameters…
| Name | number |
|---|---|
| Description | The angle in radians. |
| Type | float |
Returns…
| Description | The angle in degrees. |
|---|---|
| Type | float |
array range(mixed from, mixed to, integer step)
Create a sequence in an array.
Parameters…
| Name | from |
|---|---|
| Description | From (integer or character string). |
| Type | mixed |
| Name | to |
|---|---|
| Description | To (integer or character string). |
| Type | mixed |
| Name | step |
|---|---|
| Description | Step. |
| Default value | 1 |
| Type | integer |
Returns…
| Description | The sequence. |
|---|---|
| Type | array |
~integer readfile(PATH filename)
Outputs a file.
Parameters…
| Name | filename |
|---|---|
| Description | The filename. |
| Type | PATH |
Returns…
| Description | The number of bytes read (false: error). |
|---|---|
| Type | ~integer |
void shuffle(array array)
Shuffle an array.
Parameters…
| Name | array |
|---|---|
| Description | The array to shuffle. |
| Type | array |
(No return value)
integer similar_text(string first, string second, ?float percent)
Calculate the similarity between two strings.
Parameters…
| Name | first |
|---|---|
| Description | First string. |
| Type | string |
| Name | second |
|---|---|
| Description | Second string. |
| Type | string |
| Name | percent |
|---|---|
| Description | Returns the percentage of similarity (NULL: do not get). |
| Default value | |
| Type | ?float |
Returns…
| Description | The number of matching characters. |
|---|---|
| Type | integer |
float sqrt(float arg)
Square root.
Parameters…
| Name | arg |
|---|---|
| Description | Number. |
| Type | float |
Returns…
| Description | return 0.0; |
|---|---|
| Type | float |
integer strcasecmp(string str1, string str2)
Binary safe case-insensitive string comparison.
Parameters…
| Name | str1 |
|---|---|
| Description | The first string. |
| Type | string |
| Name | str2 |
|---|---|
| Description | The second string. |
| Type | string |
Returns…
| Description | <0 if s1<s2, 0 if s1=s2, >1 if s1>s2. |
|---|---|
| Type | integer |
integer strcoll(string str1, string str2)
Locale based string comparison.
Parameters…
| Name | str1 |
|---|---|
| Description | The first string. |
| Type | string |
| Name | str2 |
|---|---|
| Description | The second string. |
| Type | string |
Returns…
| Description | <0 if s1<s2, 0 if s1=s2, >1 if s1>s2. |
|---|---|
| Type | integer |
integer strcspn(string str1, string str2)
Find length of initial segment not matching mask.
Parameters…
| Name | str1 |
|---|---|
| Description | The subject string. |
| Type | string |
| Name | str2 |
|---|---|
| Description | The string of stop characters. |
| Type | string |
Returns…
| Description | The length. |
|---|---|
| Type | integer |
string stristr(string haystack, string needle)
Case-insensitive strstr.
Parameters…
| Name | haystack |
|---|---|
| Description | Haystack. |
| Type | string |
| Name | needle |
|---|---|
| Description | Needle. |
| Type | string |
Returns…
| Description | All of haystack from the first occurrence of needle to the end. |
|---|---|
| Type | string |
integer strnatcasecmp(string str1, string str2)
Case insensitive string comparisons using a "natural order" algorithm.
Parameters…
| Name | str1 |
|---|---|
| Description | The first string. |
| Type | string |
| Name | str2 |
|---|---|
| Description | The second string. |
| Type | string |
Returns…
| Description | <0 if s1<s2, 0 if s1=s2, >1 if s1>s2. |
|---|---|
| Type | integer |
integer strnatcmp(string str1, string str2)
String comparisons using a "natural order" algorithm.
Parameters…
| Name | str1 |
|---|---|
| Description | The first string. |
| Type | string |
| Name | str2 |
|---|---|
| Description | The second string. |
| Type | string |
Returns…
| Description | <0 if s1<s2, 0 if s1=s2, >1 if s1>s2. |
|---|---|
| Type | integer |
integer strncasecmp(string str1, string str2, integer len)
Binary safe case-insensitive string comparison of the first n characters.
Parameters…
| Name | str1 |
|---|---|
| Description | The first string. |
| Type | string |
| Name | str2 |
|---|---|
| Description | The second string. |
| Type | string |
| Name | len |
|---|---|
| Description | Up to this length (n). |
| Type | integer |
Returns…
| Description | <0 if s1<s2, 0 if s1=s2, >1 if s1>s2. |
|---|---|
| Type | integer |
integer strncmp(string str1, string str2, integer len)
Binary safe string comparison of the first n characters.
Parameters…
| Name | str1 |
|---|---|
| Description | The first string. |
| Type | string |
| Name | str2 |
|---|---|
| Description | The second string. |
| Type | string |
| Name | len |
|---|---|
| Description | Up to this length (n). |
| Type | integer |
Returns…
| Description | <0 if s1<s2, 0 if s1=s2, >1 if s1>s2. |
|---|---|
| Type | integer |
string strrchr(string haystack, string needle)
Find the last occurrence of a character in a string.
Parameters…
| Name | haystack |
|---|---|
| Description | Haystack. |
| Type | string |
| Name | needle |
|---|---|
| Description | Needle (string of length 1). |
| Type | string |
Returns…
| Description | The portion of haystack which starts at the last occurrence of needle and goes until the end of haystack. |
|---|---|
| Type | string |
string strrev(string string)
Reverse a string.
Parameters…
| Name | string |
|---|---|
| Description | String to reverse. |
| Type | string |
Returns…
| Description | Reversed string. |
|---|---|
| Type | string |
string strspn(string string, string mask)
Find length of initial segment matching mask.
Parameters…
| Name | string |
|---|---|
| Description | String to work upon. |
| Type | string |
| Name | mask |
|---|---|
| Description | String consisting of alternative characters to require along our run. |
| Type | string |
Returns…
| Description | The length of the initial segment of string which consists entirely of characters in mask. |
|---|---|
| Type | string |
string substr_replace(string string, string replacement, integer start, ?integer length)
Replace text within a portion of a string.
Parameters…
| Name | string |
|---|---|
| Description | The subject string. |
| Type | string |
| Name | replacement |
|---|---|
| Description | The replacement string. |
| Type | string |
| Name | start |
|---|---|
| Description | The start position of what's being replaced. |
| Type | integer |
| Name | length |
|---|---|
| Description | The run-length of what is being replaced (NULL: go to end of string). |
| Default value | |
| Type | ?integer |
Returns…
| Description | A copy of string delimited by the start and (optionally) length parameters with the string given in replacement. |
|---|---|
| Type | string |
float tan(float arg)
Calculate the tangent of an angle.
Parameters…
| Name | arg |
|---|---|
| Description | The angle in radians. |
| Type | float |
Returns…
| Description | The tangent. |
|---|---|
| Type | float |
~array unpack(string format, string data)
Unpack data from binary string.
Parameters…
| Name | format |
|---|---|
| Description | The formatting string for unpacking. |
| Type | string |
| Name | data |
|---|---|
| Description | The data to unpack. |
| Type | string |
Returns…
| Description | The unpacked data. (false: error) |
|---|---|
| Type | ~array |
mixed version_compare(string version1, string version2, ?string compare_symbol)
Compares two "PHP-standardized" version number strings.
Parameters…
| Name | version1 |
|---|---|
| Description | First version number. |
| Type | string |
| Name | version2 |
|---|---|
| Description | Second version number. |
| Type | string |
| Name | compare_symbol |
|---|---|
| Description | The operator to compare with (NULL: unified). |
| Default value | |
| Type | ?string |
Returns…
| Description | For unified: -1 if v1<v2, 0 if v1=v2, 1 if v1>v2. Else BINARY or boolean. |
|---|---|
| Type | mixed |
string gettype(mixed var)
Get the type of a variable.
Parameters…
| Name | var |
|---|---|
| Description | The variable. |
| Type | mixed |
Returns…
| Description | The type. |
|---|---|
| Type | string |
string zend_version()
Gets the version of the current Zend engine.
Parameters…
Returns…
| Description | The version of the currently running Zend Engine. |
|---|---|
| Type | string |
~integer xml_get_current_column_number(resource parser)
Get current column number for an XML parser.
Parameters…
| Name | parser |
|---|---|
| Description | A reference to the XML parser to get column number from. |
| Type | resource |
Returns…
| Description | Which column on the current line the parser is currently at. (false: error) |
|---|---|
| Type | ~integer |
~resource xml_parser_create(?string encoding)
Create an XML parser.
Parameters…
| Name | encoding |
|---|---|
| Description | Encoding (NULL: PHP4: as-for-input/PHP5: autodetect). |
| Default value | |
| Type | ?string |
Returns…
| Description | XML parser (false: could not create, happens on default PHP5 on Windows). (false: error) |
|---|---|
| Type | ~resource |
mixed xml_parser_get_option(resource parser, integer option)
Get options from an XML parser.
Parameters…
| Name | parser |
|---|---|
| Description | Parser. |
| Type | resource |
| Name | option |
|---|---|
| Description | Option. |
| Type | integer |
Returns…
| Description | Value. |
|---|---|
| Type | mixed |
BINARY xml_parse_into_struct(resource parser, string data, array values, ?array index)
Parse XML data into an array structure.
Parameters…
| Name | parser |
|---|---|
| Description | The parser. |
| Type | resource |
| Name | data |
|---|---|
| Description | The XML. |
| Type | string |
| Name | values |
|---|---|
| Description | Where to put the values. |
| Type | array |
| Name | index |
|---|---|
| Description | Where to put the indices into the XML for where the values are at (NULL: don't collect). Note that this is actually passed by reference, but is also optional. |
| Default value | |
| Type | ?array |
Returns…
| Description | 0 is failure, 1=pass. |
|---|---|
| Type | BINARY |
boolean xml_set_default_handler(resource parser, mixed callback)
Set up default handler.
Parameters…
| Name | parser |
|---|---|
| Description | XML parser. |
| Type | resource |
| Name | callback |
|---|---|
| Description | The callback. |
| Type | mixed |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean xml_set_external_entity_ref_handler(resource parser, mixed callback)
Set up external entity reference handler.
Parameters…
| Name | parser |
|---|---|
| Description | XML parser. |
| Type | resource |
| Name | callback |
|---|---|
| Description | The callback. |
| Type | mixed |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean xml_set_notation_decl_handler(resource parser, mixed callback)
Set up notation declaration handler.
Parameters…
| Name | parser |
|---|---|
| Description | XML parser. |
| Type | resource |
| Name | callback |
|---|---|
| Description | The callback. |
| Type | mixed |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean xml_set_processing_instruction_handler(resource parser, mixed callback)
Set up processing instruction (PI) handler.
Parameters…
| Name | parser |
|---|---|
| Description | XML parser. |
| Type | resource |
| Name | callback |
|---|---|
| Description | The callback. |
| Type | mixed |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean xml_set_unparsed_entity_decl_handler(resource parser, mixed callback)
Set up unparsed entity declaration handler.
Parameters…
| Name | parser |
|---|---|
| Description | XML parser. |
| Type | resource |
| Name | callback |
|---|---|
| Description | The callback. |
| Type | mixed |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
void var_dump(mixed expression)
Dumps information about a variable.
Parameters…
| Name | expression |
|---|---|
| Description | Data. |
| Type | mixed |
(No return value)
integer vprintf(string format, array args)
Output a formatted string.
Parameters…
| Name | format |
|---|---|
| Description | Formatting string. |
| Type | string |
| Name | args |
|---|---|
| Description | Arguments. |
| Type | array |
Returns…
| Description | Length of outputed string. |
|---|---|
| Type | integer |
string vsprintf(string format, array args)
Return a formatted string.
Parameters…
| Name | format |
|---|---|
| Description | Formatting string. |
| Type | string |
| Name | args |
|---|---|
| Description | Arguments. |
| Type | array |
Returns…
| Description | Fixed string. |
|---|---|
| Type | string |
boolean touch(PATH filename, ?TIME time, ?TIME atime)
Sets access and modification time of file.
Parameters…
| Name | filename |
|---|---|
| Description | File to touch. |
| Type | PATH |
| Name | time |
|---|---|
| Description | New modification time (NULL: do not change). |
| Default value | |
| Type | ?TIME |
| Name | atime |
|---|---|
| Description | New access time (NULL: do not change). |
| Default value | |
| Type | ?TIME |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
float tanh(float in)
Hyperbolic tangent.
Parameters…
| Name | in |
|---|---|
| Description | In. |
| Type | float |
Returns…
| Description | Out. |
|---|---|
| Type | float |
float sinh(float in)
Hyperbolic sine.
Parameters…
| Name | in |
|---|---|
| Description | In. |
| Type | float |
Returns…
| Description | Out. |
|---|---|
| Type | float |
void sleep(integer sec)
Delay execution.
Parameters…
| Name | sec |
|---|---|
| Description | Time in seconds. |
| Type | integer |
(No return value)
string soundex(string input)
Calculate the soundex key of a string.
Parameters…
| Name | input |
|---|---|
| Description | Input. |
| Type | string |
Returns…
| Description | Soundex. |
|---|---|
| Type | string |
string stripcslashes(string in)
Un-quote string quoted with addcslashes.
Parameters…
| Name | in |
|---|---|
| Description | In. |
| Type | string |
Returns…
| Description | Out. |
|---|---|
| Type | string |
~string system(string commend, ?integer ret_var)
Execute an external program and display the output.
Parameters…
| Name | commend |
|---|---|
| Description | Command to execute. |
| Type | string |
| Name | ret_var |
|---|---|
| Description | Place to put return value (NULL: not collected). Note that this is actually passed by reference, but is also optional. |
| Default value | |
| Type | ?integer |
Returns…
| Description | Output (false: error). |
|---|---|
| Type | ~string |
~integer readgzfile(PATH filename)
Output a gz-file.
Parameters…
| Name | filename |
|---|---|
| Description | Path to read from. |
| Type | PATH |
Returns…
| Description | Number of uncompressed bytes handled. (false: error) |
|---|---|
| Type | ~integer |
void restore_error_handler()
Restores the previous error handler function.
Parameters…
(No return value)
boolean rewind(resource handle)
Rewind the position of a file pointer.
Parameters…
| Name | handle |
|---|---|
| Description | File handle. |
| Type | resource |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
void rewinddir(resource handle)
Rewind directory handle.
Parameters…
| Name | handle |
|---|---|
| Description | Directory handle. |
| Type | resource |
(No return value)
string quoted_printable_decode(string in)
Convert a quoted-printable string to an 8 bit string.
Parameters…
| Name | in |
|---|---|
| Description | In. |
| Type | string |
Returns…
| Description | Out. |
|---|---|
| Type | string |
string quotemeta(string in)
Quote meta characters. Returns a version of str with a backslash character (\) before every character that is among these: . \ + * ? [ ^ ] ( $ ).
Parameters…
| Name | in |
|---|---|
| Description | In. |
| Type | string |
Returns…
| Description | Out. |
|---|---|
| Type | string |
float exp(float arg)
Calculates the exponent of e.
Parameters…
| Name | arg |
|---|---|
| Description | Arg. |
| Type | float |
Returns…
| Description | Result. |
|---|---|
| Type | float |
float lcg_value()
Combined linear congruential generator.
Parameters…
Returns…
| Description | Random number. |
|---|---|
| Type | float |
array localtime(?TIME timestamp, boolean associative)
Get the local time.
Parameters…
| Name | timestamp |
|---|---|
| Description | Timestamp (NULL: now). |
| Type | ?TIME |
| Name | associative |
|---|---|
| Description | If set to FALSE or not supplied than the array is returned as a regular, numerically indexed array. If the argument is set to TRUE then localtime() is an associative array containing all the different elements of the structure returned by the C function call to localtime. |
| Default value | boolean-false |
| Type | boolean |
Returns…
| Description | Components. |
|---|---|
| Type | array |
string addcslashes(string str, string charlist)
Quote string with slashes in a C style.
Parameters…
| Name | str |
|---|---|
| Description | Input string. |
| Type | string |
| Name | charlist |
|---|---|
| Description | Chars to convert. |
| Type | string |
Returns…
| Description | Result. |
|---|---|
| Type | string |
array array_filter(array input, ?mixed callback)
Filters elements of an array using a callback function.
Parameters…
| Name | input |
|---|---|
| Description | In. |
| Type | array |
| Name | callback |
|---|---|
| Description | The filter function callback (NULL: filter out false's). |
| Default value | |
| Type | ?mixed |
Returns…
| Description | Out. |
|---|---|
| Type | array |
array array_map(mixed callback, array array)
Applies the callback to the elements of the given array.
Parameters…
| Name | callback |
|---|---|
| Description | Callback map function. |
| Type | mixed |
| Name | array |
|---|---|
| Description | In. |
| Type | array |
Returns…
| Description | Out. |
|---|---|
| Type | array |
mixed array_sum(array array)
Add all the elements of an array.
Parameters…
| Name | array |
|---|---|
| Description | In. |
| Type | array |
Returns…
| Description | The sum (float or integer). |
|---|---|
| Type | mixed |
array array_merge_recursive(array array1, array array2, ?array array3, ?array array4, ?array array5)
Merges the elements of one or more arrays together so that the values of one are appended to the end of the previous one. It returns the resulting array.If the input arrays have the same string keys, then the values for these keys are merged together into an array, and this is done recursively, so that if one of the values is an array itself, the function will merge it with a corresponding entry in another array too. If, however, the arrays have the same numeric key, the later value will not overwrite the original value, but will be appended.
Parameters…
| Name | array1 |
|---|---|
| Description | First array to merge. |
| Type | array |
| Name | array2 |
|---|---|
| Description | Second array to merge. |
| Type | array |
| Name | array3 |
|---|---|
| Description | Third array to merge (NULL: not this one). |
| Default value | |
| Type | ?array |
| Name | array4 |
|---|---|
| Description | Fourth array to merge (NULL: not this one). |
| Default value | |
| Type | ?array |
| Name | array5 |
|---|---|
| Description | Fifth array to merge (NULL: not this one). |
| Default value | |
| Type | ?array |
Returns…
| Description | Result. |
|---|---|
| Type | array |
array array_pad(array input, integer pad_size, mixed pad_value)
Pad array to the specified length with a value.
Parameters…
| Name | input |
|---|---|
| Description | Input. |
| Type | array |
| Name | pad_size |
|---|---|
| Description | Pad size. |
| Type | integer |
| Name | pad_value |
|---|---|
| Description | Pad value. |
| Type | mixed |
Returns…
| Description | Output. |
|---|---|
| Type | array |
?integer array_reduce(array input, mixed callback, ?integer initial)
Iteratively reduce the array to a single value using a callback function.
Parameters…
| Name | input |
|---|---|
| Description | Input. |
| Type | array |
| Name | callback |
|---|---|
| Description | Process function. |
| Type | mixed |
| Name | initial |
|---|---|
| Description | Initial value (NULL: no initial). |
| Default value | |
| Type | ?integer |
Returns…
| Description | Result (NULL: no initial given, and empty array given). |
|---|---|
| Type | ?integer |
boolean array_walk(array array)
Apply a user function to every member of an array .
Parameters…
| Name | array |
|---|---|
| Description | Data. |
| Type | array |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
float atan2(float x, float y)
Arc tangent of two variables.
Parameters…
| Name | x |
|---|---|
| Description | First. |
| Type | float |
| Name | y |
|---|---|
| Description | Second. |
| Type | float |
Returns…
| Description | Result. |
|---|---|
| Type | float |
~string fgetc(resource handle)
Gets character from file pointer.
Parameters…
| Name | handle |
|---|---|
| Description | Handle. |
| Type | resource |
Returns…
| Description | Character. (false: error) |
|---|---|
| Type | ~string |
~array fgetcsv(resource handle, integer length, string delimiter)
Gets line from file pointer and parse for CSV fields.
Parameters…
| Name | handle |
|---|---|
| Description | File handle. |
| Type | resource |
| Name | length |
|---|---|
| Description | Maximum length of line. |
| Type | integer |
| Name | delimiter |
|---|---|
| Description | Delimiter. |
| Default value | , |
| Type | string |
Returns…
| Description | Line. (false: error) |
|---|---|
| Type | ~array |
~string fgetss(resource handle, integer length, string allowable_tags)
Gets line from file pointer and strip HTML tags.
Parameters…
| Name | handle |
|---|---|
| Description | File handle. |
| Type | resource |
| Name | length |
|---|---|
| Description | Maximum length of line. |
| Type | integer |
| Name | allowable_tags |
|---|---|
| Description | Allowable HTML tags separated by spaces. |
| Default value | |
| Type | string |
Returns…
| Description | Line. (false: error) |
|---|---|
| Type | ~string |
~string filetype(PATH file)
Gets file type.
Parameters…
| Name | file |
|---|---|
| Description | Filename. |
| Type | PATH |
Returns…
| Description | Result (fifo, char, dir, block, link, file, and unknown). (false: error) |
|---|---|
| Type | ~string |
array fscanf(resource handle, string format)
Parses input from a file according to a format.
Parameters…
| Name | handle |
|---|---|
| Description | File handle. |
| Type | resource |
| Name | format |
|---|---|
| Description | Formatting string. |
| Type | string |
Returns…
| Description | Data. |
|---|---|
| Type | array |
array fstat(resource handle)
Gets information about a file using an open file pointer.
Parameters…
| Name | handle |
|---|---|
| Description | File handle. |
| Type | resource |
Returns…
| Description | Map of status information. |
|---|---|
| Type | array |
boolean ftp_cdup(resource ftp_stream)
Changes to the parent directory.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | FTP handle. |
| Type | resource |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean ftp_fget(resource ftp_stream, resource file_handle, PATH remote_file, integer mode)
Downloads a file from the FTP server and saves to an open file.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | FTP handle. |
| Type | resource |
| Name | file_handle |
|---|---|
| Description | File handle. |
| Type | resource |
| Name | remote_file |
|---|---|
| Description | Remote file. |
| Type | PATH |
| Name | mode |
|---|---|
| Description | Transfer mode (FTP_ASCII or FTP_BINARY). |
| Type | integer |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean ftp_get(resource ftp_stream, PATH local_file, PATH remote_file, integer mode)
Downloads a file from the FTP server.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | FTP handle. |
| Type | resource |
| Name | local_file |
|---|---|
| Description | Local file. |
| Type | PATH |
| Name | remote_file |
|---|---|
| Description | Remote file. |
| Type | PATH |
| Name | mode |
|---|---|
| Description | Transfer mode (FTP_ASCII or FTP_BINARY). |
| Type | integer |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean ftp_pasv(resource ftp_stream, boolean pasv)
Turns passive mode on or off.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The link identifier of the FTP connection. |
| Type | resource |
| Name | pasv |
|---|---|
| Description | If TRUE, the passive mode is turned on, else it's turned off. |
| Type | boolean |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
~string ftp_pwd(resource ftp_stream)
Returns the current directory name.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The link identifier of the FTP connection. |
| Type | resource |
Returns…
| Description | Current directory name. (false: error) |
|---|---|
| Type | ~string |
~array ftp_rawlist(resource ftp_stream, PATH directory)
Returns a detailed list of files in the given directory.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The link identifier of the FTP connection. |
| Type | resource |
| Name | directory |
|---|---|
| Description | The directory path. |
| Type | PATH |
Returns…
| Description | Each element corresponds to one line of text. (false: error) |
|---|---|
| Type | ~array |
~string ftp_systype(resource ftp_stream)
Returns the system type identifier of the remote FTP server.
Parameters…
| Name | ftp_stream |
|---|---|
| Description | The link identifier of the FTP connection. |
| Type | resource |
Returns…
| Description | System type. (false: error) |
|---|---|
| Type | ~string |
boolean ftruncate(resource file, integer size)
Truncates a file to a given length.
Parameters…
| Name | file |
|---|---|
| Description | File handle. |
| Type | resource |
| Name | size |
|---|---|
| Description | Cut off size. |
| Type | integer |
Returns…
| Description | Success status (< PHP4.3, this is a BINARY). |
|---|---|
| Type | boolean |
mixed func_get_arg(integer arg_num)
Return an item from the argument list.
Parameters…
| Name | arg_num |
|---|---|
| Description | Argument number. |
| Type | integer |
Returns…
| Description | Argument. |
|---|---|
| Type | mixed |
array func_get_args()
Returns an array comprising a function's argument list.
Parameters…
Returns…
| Description | List of arguments. |
|---|---|
| Type | array |
integer func_num_args()
Returns the number of arguments passed to the function.
Parameters…
Returns…
| Description | Number of arguments. |
|---|---|
| Type | integer |
~array parse_ini_file(PATH filename, boolean process_sections)
Parse a configuration file.
Parameters…
| Name | filename |
|---|---|
| Description | The file path. |
| Type | PATH |
| Name | process_sections |
|---|---|
| Description | Whether to process sections. |
| Default value | boolean-false |
| Type | boolean |
Returns…
| Description | Map of Ini file data (2d if processed sections). (false: error) |
|---|---|
| Type | ~array |
void parse_str(string str, array arr)
Parses the string into variables.
Parameters…
| Name | str |
|---|---|
| Description | Query string to parse. |
| Type | string |
| Name | arr |
|---|---|
| Description | Target for variable mappings. |
| Type | array |
(No return value)
void passthru(PATH command, ?integer return_var)
Execute an external program and display raw output.
Parameters…
| Name | command |
|---|---|
| Description | The command that will be executed. |
| Type | PATH |
| Name | return_var |
|---|---|
| Description | Command success status (NULL: don't collect). Note that this is actually passed by reference, but is also optional. |
| Default value | |
| Type | ?integer |
(No return value)
integer pclose(resource handle)
Closes process file pointer.
Parameters…
| Name | handle |
|---|---|
| Description | Process handle. |
| Type | resource |
Returns…
| Description | Termination status. |
|---|---|
| Type | integer |
boolean is_executable(PATH filename)
Tells whether the filename is executable.
Parameters…
| Name | filename |
|---|---|
| Description | Filename. |
| Type | PATH |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_scalar(mixed var)
Finds whether a variable is a scalar (integer, float, string or boolean).
Parameters…
| Name | var |
|---|---|
| Description | Variable. |
| Type | mixed |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean is_subclass_of(mixed object, string class_name)
Find whether the object has this class as one of its parents.
Parameters…
| Name | object |
|---|---|
| Description | Object to check whether is an instance. |
| Type | mixed |
| Name | class_name |
|---|---|
| Description | Class name to check against. |
| Type | string |
Returns…
| Description | Whether it is. |
|---|---|
| Type | boolean |
boolean natcasesort(array array)
Sort an array using a case insensitive "natural order" algorithm .
Parameters…
| Name | array |
|---|---|
| Description | Array to sort. |
| Type | array |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean natsort(array array)
Sort an array using a "natural order" algorithm.
Parameters…
| Name | array |
|---|---|
| Description | Array to sort. |
| Type | array |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
string nl2br(string in)
Inserts HTML line breaks before all newlines in a string.
Parameters…
| Name | in |
|---|---|
| Description | In. |
| Type | string |
Returns…
| Description | Out. |
|---|---|
| Type | string |
~integer ob_get_length()
Return the length of the output buffer.
Parameters…
Returns…
| Description | Output buffer length. (false: error) |
|---|---|
| Type | ~integer |
string ob_gzhandler(string buffer, integer mode)
ob_start callback function to gzip output buffer.
Parameters…
| Name | buffer |
|---|---|
| Description | Input string. |
| Type | string |
| Name | mode |
|---|---|
| Description | Irrelevant (we don't use this function directly anyway). |
| Type | integer |
Returns…
| Description | Filtered version. |
|---|---|
| Type | string |
string ob_iconv_handler(string buffer, integer mode)
Convert character encoding as output buffer handler.
Parameters…
| Name | buffer |
|---|---|
| Description | Input string. |
| Type | string |
| Name | mode |
|---|---|
| Description | Irrelevant (we don't use this function directly anyway). |
| Type | integer |
Returns…
| Description | Filtered version. |
|---|---|
| Type | string |
void ob_implicit_flush(integer flag)
Turn implicit flush on/off .
Parameters…
| Name | flag |
|---|---|
| Description | Flag (1 for on, 0 for off). |
| Type | integer |
(No return value)
string php_sapi_name()
Returns the type of interface between web server and PHP.
Parameters…
Returns…
| Description | SAPI name. |
|---|---|
| Type | string |
~resource popen(string command, string mode)
Opens process file pointer.
Parameters…
| Name | command |
|---|---|
| Description | Command to execute. |
| Type | string |
| Name | mode |
|---|---|
| Description | Access mode. |
| Type | string |
| Values restricted to | r r+ w w+ a a+ |
Returns…
| Description | Socket (false: error). |
|---|---|
| Type | ~resource |
string printf(string format, ?mixed arg1, ?mixed arg2, ?mixed arg3, ?mixed arg4, ?mixed arg5)
Output a formatted string.
Parameters…
| Name | format |
|---|---|
| Description | Formatting string. |
| Type | string |
| Name | arg1 |
|---|---|
| Description | Argument (NULL: not given). |
| Default value | |
| Type | ?mixed |
| Name | arg2 |
|---|---|
| Description | Argument (NULL: not given). |
| Default value | |
| Type | ?mixed |
| Name | arg3 |
|---|---|
| Description | Argument (NULL: not given). |
| Default value | |
| Type | ?mixed |
| Name | arg4 |
|---|---|
| Description | Argument (NULL: not given). |
| Default value | |
| Type | ?mixed |
| Name | arg5 |
|---|---|
| Description | Argument (NULL: not given). |
| Default value | |
| Type | ?mixed |
Returns…
| Description | Assembled string. |
|---|---|
| Type | string |
float cosh(float arg)
Hyperbolic cosine.
Parameters…
| Name | arg |
|---|---|
| Description | Argument. |
| Type | float |
Returns…
| Description | Result. |
|---|---|
| Type | float |
mixed count_chars(string string, integer mode)
Return information about characters used in a string.
Parameters…
| Name | string |
|---|---|
| Description | The string which to work within. |
| Type | string |
| Name | mode |
|---|---|
| Description | Operation mode. |
| Default value | 0 |
| Type | integer |
| Values restricted to | 0 1 2 3 4 |
Returns…
| Description | Result, depending on mode used. |
|---|---|
| Type | mixed |
~integer disk_total_space(PATH directory)
Returns the total size of a directory.
Parameters…
| Name | directory |
|---|---|
| Description | Where to look. |
| Type | PATH |
Returns…
| Description | The size (false: error). (actually, a float) |
|---|---|
| Type | ~integer |
mixed eval(string code)
Run some code. Do not use unless absolutely needed.
Parameters…
| Name | code |
|---|---|
| Description | Code to run. |
| Type | string |
Returns…
| Description | Result |
|---|---|
| Type | mixed |
float doubleval(mixed var)
Get float value of a variable.
Parameters…
| Name | var |
|---|---|
| Description | Probably a string value. |
| Type | mixed |
Returns…
| Description | Float value. |
|---|---|
| Type | float |
~array gethostbynamel(string hostname)
Get a list of IP addresses corresponding to a given Internet host name.
Parameters…
| Name | hostname |
|---|---|
| Description | Hostname. |
| Type | string |
Returns…
| Description | List of IP addresses (false: could not resolve). |
|---|---|
| Type | ~array |
~array getimagesize(PATH filename, ?array image_info)
Get the size of an image.
Parameters…
| Name | filename |
|---|---|
| Description | Filename. |
| Type | PATH |
| Name | image_info |
|---|---|
| Description | Extra details will be put here (NULL: return-only). Note that this is actually passed by reference, but is also optional. |
| Default value | |
| Type | ?array |
Returns…
| Description | List of details: $width, $height, $type, $attr. (false: error) |
|---|---|
| Type | ~array |
~integer getmypid()
Gets PHP's process ID.
Parameters…
Returns…
| Description | Process ID. (false: error) |
|---|---|
| Type | ~integer |
~integer getmyuid()
Gets PHP's user ID.
Parameters…
Returns…
| Description | User ID. (false: error) |
|---|---|
| Type | ~integer |
array gettimeofday()
Get current time.
Parameters…
Returns…
| Description | Map of time details. |
|---|---|
| Type | array |
boolean get_magic_quotes_runtime()
Gets the current active configuration setting of magic_quotes_runtime.
Parameters…
Returns…
| Description | Current value (Actually BINARY, but boolean will work). |
|---|---|
| Type | boolean |
string get_parent_class(object object)
Retrieves the parent class name for object or class.
Parameters…
| Name | object |
|---|---|
| Description | Object to check. |
| Type | object |
Returns…
| Description | Classname. |
|---|---|
| Type | string |
array get_included_files()
Returns an array with the names of included or required files.
Parameters…
Returns…
| Description | Included files. |
|---|---|
| Type | array |
string get_resource_type(resource handle)
Returns the resource type.
Parameters…
| Name | handle |
|---|---|
| Description | Resource to check. |
| Type | resource |
Returns…
| Description | The resource type. |
|---|---|
| Type | string |
string gzcompress(string data, integer level)
Compress a string.
Parameters…
| Name | data |
|---|---|
| Description | Data to compress. |
| Type | string |
| Name | level |
|---|---|
| Description | Compression level. |
| Type | integer |
Returns…
| Description | Compressed data. |
|---|---|
| Type | string |
~string gzdeflate(string data, integer level)
Deflate a string.
Parameters…
| Name | data |
|---|---|
| Description | Compressed data. |
| Type | string |
| Name | level |
|---|---|
| Description | Compression level. |
| Type | integer |
Returns…
| Description | Uncompressed data. (false: error) |
|---|---|
| Type | ~string |
string gzencode(string data, integer level)
Create a gzip compressed string.
Parameters…
| Name | data |
|---|---|
| Description | In. |
| Type | string |
| Name | level |
|---|---|
| Description | How much compression. |
| Type | integer |
| Value range | 1 9 |
Returns…
| Description | Out. |
|---|---|
| Type | string |
~array gzfile(PATH filename)
Read entire gz-file into an array.
Parameters…
| Name | filename |
|---|---|
| Description | The filename. |
| Type | PATH |
Returns…
| Description | An array containing the file, one line per cell. (false: error) |
|---|---|
| Type | ~array |
string gzinflate(string data, integer length)
Inflate a deflated string.
Parameters…
| Name | data |
|---|---|
| Description | The data compressed by gzdeflate(). |
| Type | string |
| Name | length |
|---|---|
| Description | Maximum length to read in. |
| Type | integer |
Returns…
| Description | Inflated (uncompressed) data. |
|---|---|
| Type | string |
string gzuncompress(string data, integer length)
Uncompress a compressed string.
Parameters…
| Name | data |
|---|---|
| Description | The data compressed by gzcompress(). |
| Type | string |
| Name | length |
|---|---|
| Description | Maximum length to read in. |
| Type | integer |
Returns…
| Description | Uncompressed data. |
|---|---|
| Type | string |
float hypot(float x, float y)
Calculate the length of the hypotenuse of a right-angle triangle.
Parameters…
| Name | x |
|---|---|
| Description | X. |
| Type | float |
| Name | y |
|---|---|
| Description | Y. |
| Type | float |
Returns…
| Description | Result. |
|---|---|
| Type | float |
boolean ignore_user_abort(boolean setting)
Set whether a client disconnect should abort script execution.
Parameters…
| Name | setting |
|---|---|
| Description | Setting. |
| Type | boolean |
Returns…
| Description | Previous setting. |
|---|---|
| Type | boolean |
string session_cache_limiter(?string cache_limiter)
Get and/or set the current cache limiter.
Parameters…
| Name | cache_limiter |
|---|---|
| Description | New Setting (NULL: don't change). |
| Default value | |
| Type | ?string |
Returns…
| Description | Current setting. |
|---|---|
| Type | string |
boolean session_decode(string data)
Decodes session data from a string.
Parameters…
| Name | data |
|---|---|
| Description | Data to decode. |
| Type | string |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
void session_destroy()
Destroys all data registered to a session.
Parameters…
(No return value)
string session_encode()
Encodes the current session data as a string.
Parameters…
Returns…
| Description | Session data. |
|---|---|
| Type | string |
array session_get_cookie_params()
Get the session cookie parameters.
Parameters…
Returns…
| Description | Data. |
|---|---|
| Type | array |
string session_id(?string id)
Get and/or set the current session id.
Parameters…
| Name | id |
|---|---|
| Description | New setting (NULL: don't change). |
| Default value | |
| Type | ?string |
Returns…
| Description | Current setting. |
|---|---|
| Type | string |
string session_module_name(?string name)
Get and/or set the current session module.
Parameters…
| Name | name |
|---|---|
| Description | New session module name (NULL: don't change). |
| Default value | |
| Type | ?string |
Returns…
| Description | Current session module name. |
|---|---|
| Type | string |
string session_name(?string name)
Get and/or set the current session name.
Parameters…
| Name | name |
|---|---|
| Description | New session name (NULL: don't change). |
| Default value | |
| Type | ?string |
Returns…
| Description | Current session name. |
|---|---|
| Type | string |
string session_save_path(?PATH path)
Get and/or set the current session save path.
Parameters…
| Name | path |
|---|---|
| Description | New session save path (NULL: don't change). |
| Default value | |
| Type | ?PATH |
Returns…
| Description | Current session save path. |
|---|---|
| Type | string |
void session_set_cookie_params(integer lifetime, ?string path, ?string domain)
Set the session cookie parameters.
Parameters…
| Name | lifetime |
|---|---|
| Description | Lifetime. |
| Type | integer |
| Name | path |
|---|---|
| Description | Cookie path (NULL: no path limitation). |
| Default value | |
| Type | ?string |
| Name | domain |
|---|---|
| Description | Cookie domain (NULL: autodetect). |
| Default value | |
| Type | ?string |
(No return value)
boolean session_set_save_handler(mixed open, mixed close, mixed read, mixed write, mixed destroy, mixed gc)
Sets user-level session storage functions.
Parameters…
| Name | open |
|---|---|
| Description | Callback (open). |
| Type | mixed |
| Name | close |
|---|---|
| Description | Callback (close). |
| Type | mixed |
| Name | read |
|---|---|
| Description | Callback (read). |
| Type | mixed |
| Name | write |
|---|---|
| Description | Callback (write). |
| Type | mixed |
| Name | destroy |
|---|---|
| Description | Callback (destroy). |
| Type | mixed |
| Name | gc |
|---|---|
| Description | Callback (garbage collection). |
| Type | mixed |
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean session_start()
Initialize session data.
Parameters…
Returns…
| Description | Success status. |
|---|---|
| Type | boolean |
boolean session_unset(boolean foo)
Set whether a client disconnect should abort script execution.
Parameters…
| Name | foo |
|---|---|
| Description | Setting. |
| Type | boolean |
Returns…
| Description | Previous setting. |
|---|---|
| Type | boolean |
void session_write_close()
Write session data and end session.
Parameters…
(No return value)
void ocp_mark_as_escaped(string var)
XSS detection helper function.
Parameters…
| Name | var |
|---|---|
| Description | String to mark as escaped. |
| Type | string |
(No return value)
boolean ocp_is_escaped(string var)
XSS detection helper function.
Parameters…
| Name | var |
|---|---|
| Description | String to test for being escaped. |
| Type | string |
Returns…
| Description | Whether string is escaped. |
|---|---|
| Type | boolean |




0 reviews: Unrated (average)
There have been no comments yet