PHP-Manual *php-manual*
Created on 2004-11-21, 13:34:58
==============================================================================
Apache *php-apache*
*apache_child_terminate()* >
bool apache_child_terminate()
|apache_child_terminate| will register the Apache process executing the
current PHP request for termination once execution of PHP code it is
completed. It may be used to terminate a process after a script with high
memory consumption has been run as memory will usually only be freed
internally but not given back to the operating system.
*apache_get_modules()* >
array apache_get_modules()
This function returns an array with the loaded Apache modules.
*apache_get_version()* >
string apache_get_version()
|apache_get_version| returns the version of Apache as string, or FALSE on
failure.
*apache_getenv()* >
string apache_getenv(string variable [, bool walk_to_top])
|apache_getenv| returns the value of the Apache environment variable specified
by {variable}, or FALSE on failure.
*apache_lookup_uri()* >
object apache_lookup_uri(string filename)
This performs a partial request for a URI. It goes just far enough to obtain
all the important information about the given resource and returns this
information in a class. The properties of the returned class are: status
the_request status_line method content_type handler uri filename path_info
args boundary no_cache no_local_copy allowed send_bodyct bytes_sent byterange
clength unparsed_uri mtime request_time
*apache_note()* >
string apache_note(string note_name [, string note_value])
|apache_note| is an Apache-specific function which gets and sets values in a
request's notes table. If called with one argument, it returns the current
value of note note_name. If called with two arguments, it sets the value of
note note_name to note_value and returns the previous value of note
note_name.
*apache_request_headers()* >
array apache_request_headers()
|apache_request_headers| returns an associative array of all the HTTP headers
in the current request. This is only supported when PHP runs as an Apache
module.
*apache_response_headers()* >
array apache_response_headers()
Returns an array of all Apache response headers.
*apache_setenv()* >
int apache_setenv(string variable, string value [, bool walk_to_top])
|apache_setenv| sets the value of the Apache environment variable specified by
{variable}.
*ascii2ebcdic()* >
int ascii2ebcdic(string ascii_str)
|ascii2ebcdic| is an Apache-specific function which is available only on
EBCDIC based operating systems (OS/390, BS2000). It translates the ASCII
encoded string {ascii_str} to its equivalent EBCDIC representation (binary
safe), and returns the result.
*ebcdic2ascii()* >
int ebcdic2ascii(string ebcdic_str)
|ebcdic2ascii| is an Apache-specific function which is available only on
EBCDIC based operating systems (OS/390, BS2000). It translates the EBCDIC
encoded string {ebcdic_str} to its equivalent ASCII representation (binary
safe), and returns the result.
*getallheaders()* >
array getallheaders()
|getallheaders| is an alias for |apache_request_headers|. It will return an
associative array of all the HTTP headers in the current request. Please read
the |apache_request_headers| documentation for more information on how this
function works.
*virtual()* >
int virtual(string filename)
|virtual| is an Apache-specific function which is equivalent to in mod_include. It performs an Apache sub-request. It is useful
for including CGI scripts or .shtml files, or anything else that you would
parse through Apache. Note that for a CGI script, the script must generate
valid CGI headers. At the minimum that means it must generate a Content-type
header.
==============================================================================
Apd *php-apd*
*apd_breakpoint()* >
void apd_breakpoint(int debug_level)
This can be used to stop the running of your script, and await responses on
the connected socket. To step the program, just send enter (a blank line), or
enter a php command to be executed. A typical session using tcplisten would
look like this.
*apd_callstack()* >
array apd_callstack()
Returns the current call stack as an array
*apd_clunk()* >
void apd_clunk(string warning [, string delimiter])
Behaves like perl's Carp::cluck. Throw a warning and a callstack. The default
line delimiter is "
\n".
*apd_continue()* >
void apd_continue(int debug_level)
Usually sent via the socket to restart the interpreter.
*apd_croak()* >
void apd_croak(string warning [, string delimiter])
Behaves like perl's Carp::croak. Throw an error, a callstack and then exit.
The default line delimiter is "
\n".
*apd_dump_function_table()* >
void apd_dump_function_table()
Outputs the current function table.
*apd_dump_persistent_resources()* >
array apd_dump_persistent_resources()
Return all persistent resources as an array.
*apd_dump_regular_resources()* >
array apd_dump_regular_resources()
Return all current regular resources as an array.
*apd_echo()* >
void apd_echo(string output)
Usually sent via the socket to request information about the running script.
*apd_get_active_symbols()* >
array apd_get_active_symbols()
Returns the names of all the variables defined in the active scope, (not their
values)
*apd_set_pprof_trace()* >
void apd_set_pprof_trace( [string dump_directory])
Starts debugging to {dump_directory}/pprof_{process_id}, if dump_directory is
not set, then the apd.dumpdir setting from the php.ini file is used.
*apd_set_session_trace()* >
void apd_set_session_trace(int debug_level [, string dump_directory])
Starts debugging to {dump_directory}/apd_dump_{process_id}, if dump_directory
is not set, then the apd.dumpdir setting from the php.ini file is used.
*apd_set_session()* >
void apd_set_session(int debug_level)
This can be used to increase or decrease debugging in a different area of your
application,.debug_level is an integer which is formed by adding together the
following values:
*apd_set_socket_session_trace()* >
bool apd_set_socket_session_trace(int socket_type, int port, int debug_level)
Connects to the tcp server (eg. tcplisten) specified IP or Unix Domain socket
(like a file), and sends debugging data to the socket. You can use any port,
but higher numbers are better as most of the lower numbers may be used by
other system services.
*override_function()* >
bool override_function(string function_name, string function_args, string function_code)
Syntax similar to create_function(). Overrides built-in functions (replaces
them in the symbol table).
*rename_function()* >
bool rename_function(string original_name, string new_name)
Renames orig_name to new_name in the global function_table. Useful for
temporarily overriding builtin functions.
==============================================================================
Array *php-array*
*array_change_key_case()* >
array array_change_key_case(array input [, int case])
|array_change_key_case| changes the keys in the {input} array to be all
lowercase or uppercase. The change depends on the last optional {case}
parameter. You can pass two constants there, CASE_UPPER and CASE_LOWER. The
default is CASE_LOWER. The function will leave number indices as is.
*array_chunk()* >
array array_chunk(array input, int size [, bool preserve_keys])
|array_chunk| splits the array into several arrays with {size} values in them.
You may also have an array with less values at the end. You get the arrays as
members of a multidimensional array indexed with numbers starting from zero.
*array_combine()* >
array array_combine(array keys, array values)
Returns an array by using the values from the {keys} array as keys and the
values from the {values} array as the corresponding values.
*array_count_values()* >
array array_count_values(array input)
|array_count_values| returns an array using the values of the {input} array as
keys and their frequency in {input} as values.
*array_diff_assoc()* >
array array_diff_assoc(array array1, array array2)
|array_diff_assoc| returns an array containing all the values from {array1}
that are not present in any of the other arguments. Note that the keys are
used in the comparison unlike |array_diff|.
*array_diff_key()* >
array array_diff_key(array array1, array array2)
|array_diff_key| returns an array containing all the values of {array1} that
have keys that are not present in any of the other arguments. Note that the
associativity is preserved. This function is like |array_diff| except the
comparison is done on the keys instead of the values.
*array_diff_uassoc()* >
array array_diff_uassoc(array array1, array array2, callback key_compare_func)
|array_diff_uassoc| returns an array containing all the values from {array1}
that are not present in any of the other arguments. Note that the keys are
used in the comparison unlike |array_diff|. This comparison is done by a user
supplied callback function. It must return an integer less than, equal to, or
greater than zero if the first argument is considered to be respectively less
than, equal to, or greater than the second. This is unlike |array_diff_assoc|
where an internal function for comparing the indices is used.
*array_diff_ukey()* >
array array_diff_ukey(array array1, array array2, callback key_compare_func)
|array_diff_ukey| returns an array containing all the values of {array1} that
have keys that are not present in any of the other arguments. Note that the
associativity is preserved. This function is like |array_diff| except the
comparison is done on the keys instead of the values.
*array_diff()* >
array array_diff(array array1, array array2)
|array_diff| returns an array containing all the values of {array1} that are
not present in any of the other arguments. Note that keys are preserved.
*array_fill()* >
array array_fill(int start_index, int num, mixed value)
|array_fill| fills an array with {num} entries of the value of the {value}
parameter, keys starting at the {start_index} parameter. Note that num must
be a number greater than zero, or PHP will throw a warning.
*array_filter()* >
array array_filter(array input [, callback callback])
|array_filter| iterates over each value in the {input} array passing them to
the {callback} function. If the callback function returns true, the current
value from {input} is returned into the result array. Array keys are
preserved.
*array_flip()* >
array array_flip(array trans)
|array_flip| returns an array in flip order, i.e. keys from {trans} become
values and values from {trans} become keys.
*array_intersect_assoc()* >
array array_intersect_assoc(array array1, array array2)
|array_intersect_assoc| returns an array containing all the values of {array1}
that are present in all the arguments. Note that the keys are used in the
comparison unlike in |array_intersect|.
*array_intersect_key()* >
array array_intersect_key(array array1, array array2)
|array_intersect_key| returns an array containing all the values of {array1}
which have matching keys that are present in all the arguments.
*array_intersect_uassoc()* >
array array_intersect_uassoc(array array1, array array2, callback key_compare_func)
|array_intersect_uassoc| returns an array containing all the values of
{array1} that are present in all the arguments. Note that the keys are used
in the comparison unlike in |array_intersect|.
*array_intersect_ukey()* >
array array_intersect_ukey(array array1, array array2, callback key_compare_func)
|array_intersect_ukey| returns an array containing all the values of {array1}
which have matching keys that are present in all the arguments.
*array_intersect()* >
array array_intersect(array array1, array array2)
|array_intersect| returns an array containing all the values of {array1} that
are present in all the arguments. Note that keys are preserved.
*array_key_exists()* >
bool array_key_exists(mixed key, array search)
|array_key_exists| returns TRUE if the given {key} is set in the array. {key}
can be any value possible for an array index. |array_key_exists| also works
on objects.
*array_keys()* >
array array_keys(array input [, mixed search_value [, bool strict]])
|array_keys| returns the keys, numeric and string, from the {input} array.
*array_map()* >
array array_map(callback callback, array arr1)
|array_map| returns an array containing all the elements of {arr1} after
applying the {callback} function to each one. The number of parameters that
the {callback} function accepts should match the number of arrays passed to
the |array_map|
*array_merge_recursive()* >
array array_merge_recursive(array array1, array array2)
|array_merge_recursive| merges the elements of two or more arrays together so
that the values of one are appended to the end of the previous one. It
returns the resulting array.
*array_merge()* >
array array_merge(array array1 [, array array2])
|array_merge| 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.
*array_multisort()* >
bool array_multisort(array ar1 [, mixed arg])
Returns TRUE on success or FALSE on failure.;
*array_pad()* >
array array_pad(array input, int pad_size, mixed pad_value)
|array_pad| returns a copy of the {input} padded to size specified by
{pad_size} with value {pad_value}. If {pad_size} is positive then the array
is padded on the right, if it's negative then on the left. If the absolute
value of {pad_size} is less than or equal to the length of the {input} then
no padding takes place.
*array_pop()* >
mixed array_pop()
|array_pop| pops and returns the last value of the {array}, shortening the
{array} by one element. If {array} is empty (or is not an array), NULL will
be returned.
*array_push()* >
int array_push(mixed var)
|array_push| treats {array} as a stack, and pushes the passed variables onto
the end of {array}. The length of {array} increases by the number of
variables pushed. Has the same effect as: ]]> repeated for each {var}.
*array_rand()* >
mixed array_rand(array input [, int num_req])
|array_rand| is rather useful when you want to pick one or more random entries
out of an array. It takes an {input} array and an optional argument {num_req}
which specifies how many entries you want to pick - if not specified, it
defaults to 1.
*array_reduce()* >
mixed array_reduce(array input, callback function [, int initial])
|array_reduce| applies iteratively the {function} function to the elements of
the array {input}, so as to reduce the array to a single value. If the
optional {initial} is available, it will be used at the beginning of the
process, or as a final result in case the array is empty.
*array_reverse()* >
array array_reverse(array array [, bool preserve_keys])
|array_reverse| takes input {array} and returns a new array with the order of
the elements reversed, preserving the keys if {preserve_keys} is TRUE.
*array_search()* >
mixed array_search(mixed needle, array haystack [, bool strict])
Searches {haystack} for {needle} and returns the key if it is found in the
array, FALSE otherwise.
*array_shift()* >
mixed array_shift()
|array_shift| shifts the first value of the {array} off and returns it,
shortening the {array} by one element and moving everything down. All
numerical array keys will be modified to start counting from zero while
literal keys won't be touched. If {array} is empty (or is not an array), NULL
will be returned.
*array_slice()* >
array array_slice(array array, int offset [, int length [, bool preserve_keys]])
|array_slice| returns the sequence of elements from the array {array} as
specified by the {offset} and {length} parameters.
*array_splice()* >
array array_splice(int offset [, int length [, array replacement]])
|array_splice| removes the elements designated by {offset} and {length} from
the {input} array, and replaces them with the elements of the {replacement}
array, if supplied. It returns an array containing the extracted elements.
*array_sum()* >
number array_sum(array array)
|array_sum| returns the sum of values in an array as an integer or float.
*array_udiff_assoc()* >
array array_udiff_assoc(array array1, array array2, callback data_compare_func)
|array_udiff_assoc| returns an array containing all the values from {array1}
that are not present in any of the other arguments. Note that the keys are
used in the comparison unlike |array_diff| and |array_udiff|. The comparison
of arrays' data is performed by using an user-supplied callback. In this
aspect the behaviour is opposite to the behaviour of |array_diff_assoc| which
uses internal function for comparison.
*array_udiff_uassoc()* >
array array_udiff_uassoc(array array1, array array2, callback data_compare_func, callback key_compare_func)
|array_udiff_uassoc| returns an array containing all the values from {array1}
that are not present in any of the other arguments. Note that the keys are
used in the comparison unlike |array_diff| and |array_udiff|. The comparison
of arrays' data is performed by using an user-supplied callback :
{data_compare_func}. In this aspect the behaviour is opposite to the
behaviour of |array_diff_assoc| which uses internal function for comparison.
The comparison of keys (indices) is done also by the callback function
{key_compare_func}. This behaviour is unlike what |array_udiff_assoc| does,
since the latter compares the indices by using an internal function.
*array_udiff()* >
array array_udiff(array array1, array array2, callback data_compare_func)
|array_udiff| returns an array containing all the values of {array1} that are
not present in any of the other arguments. Note that keys are preserved. For
the comparison of the data {data_compare_func} is used. It must return an
integer less than, equal to, or greater than zero if the first argument is
considered to be respectively less than, equal to, or greater than the
second. This is unlike |array_diff| which uses an internal function for
comparing the data.
*array_uintersect_assoc()* >
array array_uintersect_assoc(array array1, array array2, callback data_compare_func)
|array_uintersect_assoc| returns an array containing all the values of
{array1} that are present in all the arguments. Note that the keys are used
in the comparison unlike in |array_uintersect|. The data is compared by using
a callback function.
*array_uintersect_uassoc()* >
array array_uintersect_uassoc(array array1, array array2, callback data_compare_func, callback key_compare_func)
|array_uintersect_uassoc| returns an array containing all the values of
{array1} that are present in all the arguments. Note that the keys are used
in the comparison unlike in |array_uintersect|. Both the data and the indexes
are compared by using a callback functions.
*array_uintersect()* >
array array_uintersect(array array1, array array2, callback data_compare_func)
|array_uintersect| returns an array containing all the values of {array1} that
are present in all the arguments. The data is compared by using a callback
function.
*array_unique()* >
array array_unique(array array)
|array_unique| takes input {array} and returns a new array without duplicate
values.
*array_unshift()* >
int array_unshift(mixed var)
|array_unshift| prepends passed elements to the front of the {array}. Note
that the list of elements is prepended as a whole, so that the prepended
elements stay in the same order. All numerical array keys will be modified to
start counting from zero while literal keys won't be touched.
*array_values()* >
array array_values(array input)
|array_values| returns all the values from the {input} array and indexes
numerically the array.
*array_walk_recursive()* >
bool array_walk_recursive(callback funcname [, mixed userdata])
Applies the user-defined function {funcname} to each element of the {input}
array. This function will recur into deeper arrays. Typically, {funcname}
takes on two parameters. The {input} parameter's value being the first, and
the key/index second. If the optional {userdata} parameter is supplied, it
will be passed as the third parameter to the callback {funcname}.
*array_walk()* >
bool array_walk(callback funcname [, mixed userdata])
Returns TRUE on success or FALSE on failure.;
*array()* >
array array()
Returns an array of the parameters. The parameters can be given an index with
the => operator. Read the section on the array type for more information on
what an array is.
*arsort()* >
bool arsort( [int sort_flags])
This function sorts an array such that array indices maintain their
correlation with the array elements they are associated with. This is used
mainly when sorting associative arrays where the actual element order is
significant.
*asort()* >
bool asort( [int sort_flags])
This function sorts an array such that array indices maintain their
correlation with the array elements they are associated with. This is used
mainly when sorting associative arrays where the actual element order is
significant.
*compact()* >
array compact(mixed varname)
|compact| takes a variable number of parameters. Each parameter can be either
a string containing the name of the variable, or an array of variable names.
The array can contain other arrays of variable names inside it; |compact|
handles it recursively.
*count()* >
int count(mixed var [, int mode])
Returns the number of elements in {var}, which is typically an array, since
anything other than objects will have one element.
*current()* >
mixed current()
Every array has an internal pointer to its "current" element, which is
initialized to the first element inserted into the array.
*each()* >
array each()
Returns the current key and value pair from the array {array} and advances the
array cursor. This pair is returned in a four-element array, with the keys 0,
1, key, and value. Elements 0 and key contain the key name of the array
element, and 1 and value contain the data.
*end()* >
mixed end()
|end| advances {array}'s internal pointer to the last element, and returns its
value.
*extract()* >
int extract(array var_array [, int extract_type [, string prefix]])
This function is used to import variables from an array into the current
symbol table. It takes an associative array {var_array} and treats keys as
variable names and values as variable values. For each key/value pair it will
create a variable in the current symbol table, subject to {extract_type} and
{prefix} parameters.
*in_array()* >
bool in_array(mixed needle, array haystack [, bool strict])
Searches {haystack} for {needle} and returns TRUE if it is found in the array,
FALSE otherwise.
*key()* >
mixed key()
|key| returns the index element of the current array position.
*krsort()* >
bool krsort( [int sort_flags])
Sorts an array by key in reverse order, maintaining key to data correlations.
This is useful mainly for associative arrays.
*ksort()* >
bool ksort( [int sort_flags])
Sorts an array by key, maintaining key to data correlations. This is useful
mainly for associative arrays.
*list()* >
void list(mixed varname)
Like |array|, this is not really a function, but a language construct. |list|
is used to assign a list of variables in one operation.
*natcasesort()* >
void natcasesort()
This function implements a sort algorithm that orders alphanumeric strings in
the way a human being would while maintaining key/value associations. This is
described as a "natural ordering".
*natsort()* >
void natsort()
This function implements a sort algorithm that orders alphanumeric strings in
the way a human being would while maintaining key/value associations. This is
described as a "natural ordering". An example of the difference between this
algorithm and the regular computer string sorting algorithms (used in |sort|)
can be seen below:
*next()* >
mixed next()
Returns the array value in the next place that's pointed to by the internal
array pointer, or FALSE if there are no more elements.
*pos()* >
void pos()
This function is an alias of |current|.
*prev()* >
mixed prev()
Returns the array value in the previous place that's pointed to by the
internal array pointer, or FALSE if there are no more elements. If the array
contains empty elements then this function will return FALSE for these
elements as well. To properly traverse an array which may contain empty
elements see the |each| function.
*range()* >
array range(number low, number high [, number step])
|range| returns an array of elements from {low} to {high}, inclusive. If low >
high, the sequence will be from high to low.
*reset()* >
mixed reset()
|reset| rewinds {array}'s internal pointer to the first element and returns
the value of the first array element, or FALSE if the array is empty.
*rsort()* >
bool rsort( [int sort_flags])
This function sorts an array in reverse order (highest to lowest).
*shuffle()* >
bool shuffle()
This function shuffles (randomizes the order of the elements in) an array.
|shuffle| example ]]>
*sizeof()* >
void sizeof()
This function is an alias of |count|.
*sort()* >
bool sort( [int sort_flags])
This function sorts an array. Elements will be arranged from lowest to highest
when this function has completed.
*uasort()* >
bool uasort(callback cmp_function)
This function sorts an array such that array indices maintain their
correlation with the array elements they are associated with. This is used
mainly when sorting associative arrays where the actual element order is
significant. The comparison function is user-defined.
*uksort()* >
bool uksort(callback cmp_function)
|uksort| will sort the keys of an array using a user-supplied comparison
function. If the array you wish to sort needs to be sorted by some
non-trivial criteria, you should use this function.
*usort()* >
bool usort(callback cmp_function)
This function will sort an array by its values using a user-supplied
comparison function. If the array you wish to sort needs to be sorted by some
non-trivial criteria, you should use this function.
==============================================================================
Aspell *php-aspell*
*aspell_check_raw()* >
bool aspell_check_raw(int dictionary_link, string word)
|aspell_check_raw| checks the spelling of a word, without changing its case or
trying to trim it in any way and returns TRUE if the spelling is correct,
FALSE if not.
*aspell_check()* >
bool aspell_check(int dictionary_link, string word)
|aspell_check| checks the spelling of a word and returns TRUE if the spelling
is correct, FALSE if not.
*aspell_new()* >
int aspell_new(string master [, string personal])
|aspell_new| opens up a new dictionary and returns the dictionary link
identifier for use in other aspell functions. Returns FALSE on error.
*aspell_suggest()* >
array aspell_suggest(int dictionary_link, string word)
|aspell_suggest| returns an array of possible spellings for the given word.
==============================================================================
Bc *php-bc*
*bcadd()* >
string bcadd(string left_operand, string right_operand [, int scale])
Adds the {left_operand} to the {right_operand} and returns the sum in a
string. The optional {scale} parameter is used to set the number of digits
after the decimal place in the result.
*bccomp()* >
int bccomp(string left_operand, string right_operand [, int scale])
Compares the {left_operand} to the {right_operand} and returns the result as
an integer. The optional {scale} parameter is used to set the number of
digits after the decimal place which will be used in the comparison. The
return value is 0 if the two operands are equal. If the {left_operand} is
larger than the {right_operand} the return value is +1 and if the
{left_operand} is less than the {right_operand} the return value is -1.
*bcdiv()* >
string bcdiv(string left_operand, string right_operand [, int scale])
Divides the {left_operand} by the {right_operand} and returns the result. The
optional {scale} sets the number of digits after the decimal place in the
result.
*bcmod()* >
string bcmod(string left_operand, string modulus)
Get the modulus of the {left_operand} using {modulus}.
*bcmul()* >
string bcmul(string left_operand, string right_operand [, int scale])
Multiply the {left_operand} by the {right_operand} and returns the result. The
optional {scale} sets the number of digits after the decimal place in the
result.
*bcpow()* >
string bcpow(string x, string y [, int scale])
Raise {x} to the power {y}. The optional {scale} can be used to set the number
of digits after the decimal place in the result.
*bcpowmod()* >
string bcpowmod(string x, string y, string modulus [, int scale])
Use the fast-exponentiation method to raise {x} to the power {y} with respect
to the modulus {modulus}. The optional {scale} can be used to set the number
of digits after the decimal place in the result.
*bcscale()* >
bool bcscale(int scale)
This function sets the default scale parameter for all subsequent bc math
functions that do not explicitly specify a scale parameter. Returns TRUE on
success or FALSE on failure.;
*bcsqrt()* >
string bcsqrt(string operand [, int scale])
Return the square root of the {operand}. The optional {scale} parameter sets
the number of digits after the decimal place in the result.
*bcsub()* >
string bcsub(string left_operand, string right_operand [, int scale])
Subtracts the {right_operand} from the {left_operand} and returns the result
in a string. The optional {scale} parameter is used to set the number of
digits after the decimal place in the result.
==============================================================================
Bcompiler *php-bcompiler*
*bcompiler_load_exe()* >
bool bcompiler_load_exe(string filename)
Reads data from a bcompiler exe file and creates classes from the bytecodes
*bcompiler_load()* >
bool bcompiler_load(string filename)
Reads data from a bzcompressed file and creates classes from the bytecodes
*bcompiler_parse_class()* >
bool bcompiler_parse_class(string class, string callback)
reads the bytecodes of a class and calls back to a user function
*bcompiler_read()* >
bool bcompiler_read(resource filehandle)
Reads data from a open file handle and creates classes from the bytecodes
*bcompiler_write_class()* >
bool bcompiler_write_class(resource filehandle, string className [, string extends])
This reads the bytecodes from PHP for an existing class, and writes them to
the open file handle, It does not perform dependency checking, so make sure
you write the classes in an order that will not result in an 'undefined
class' occurring when you load it.
*bcompiler_write_constant()* >
bool bcompiler_write_constant(resource filehandle, string constantName)
This function reads the bytecodes from PHP for an existing constant, and
writes them to the open file handle.
*bcompiler_write_exe_footer()* >
bool bcompiler_write_exe_footer(resource filehandle, int startpos)
An EXE (or self executable) file consists of 3 parts,
*bcompiler_write_footer()* >
bool bcompiler_write_footer(resource filehandle)
Writes the a single character \x00 to indicate End of compiled data
*bcompiler_write_function()* >
bool bcompiler_write_function(resource filehandle, string functionName)
This reads the bytecodes from PHP for an existing function, and writes them to
the open file handle. Order is not important, (eg. if function b uses function
a, and you compile it like the example below, it will work perfectly OK)
*bcompiler_write_functions_from_file()* >
bool bcompiler_write_functions_from_file(resource filehandle, string fileName)
This function searches for all functions declared in the given file, and
writes their correspondent bytecodes to the open file handle. Always remember
to include/require the file you intend to compile.
*bcompiler_write_header()* >
bool bcompiler_write_header(resource filehandle [, string write_ver])
Writes the header part of a bcompiler file.
==============================================================================
Bzip2 *php-bzip2*
*bzclose()* >
int bzclose(resource bz)
Closes the bzip2 file referenced by the pointer {bz}.
*bzcompress()* >
string bzcompress(string source [, int blocksize [, int workfactor]])
|bzcompress| compresses the {source} string and returns it as bzip2 encoded
data.
*bzdecompress()* >
string bzdecompress(string source [, int small])
|bzdecompress| decompresses the {source} string containing bzip2 encoded data
and returns it. If the optional parameter {small} is TRUE, an alternative
decompression algorithm will be used which uses less memory (the maximum
memory requirement drops to around 2300K) but works at roughly half the
speed. See the bzip2 documentation for more information about this feature.
*bzerrno()* >
int bzerrno(resource bz)
Returns the error number of any bzip2 error returned by the file pointer {bz}.
*bzerror()* >
array bzerror(resource bz)
Returns the error number and error string, in an associative array, of any
bzip2 error returned by the file pointer {bz}.
*bzerrstr()* >
string bzerrstr(resource bz)
Returns the error string of any bzip2 error returned by the file pointer {bz}.
*bzflush()* >
int bzflush(resource bz)
Forces a write of all buffered bzip2 data for the file pointer {bz}.
*bzopen()* >
resource bzopen(string filename, string mode)
|bzopen| opens a bzip2 (.bz2) file for reading or writing. {filename} is the
name of the file to open. {mode} is similar to the |fopen| function (`r' for
read, `w' for write, etc.).
*bzread()* >
string bzread(resource bz [, int length])
|bzread| reads up to {length} bytes from the bzip2 file pointer referenced by
{bz}. Reading stops when {length} (uncompressed) bytes have been read or EOF
is reached, whichever comes first. If the optional parameter {length} is not
specified, |bzread| will read 1024 (uncompressed) bytes at a time.
*bzwrite()* >
int bzwrite(resource bz, string data [, int length])
|bzwrite| writes the contents of the string {data} to the bzip2 file stream
pointed to by {bz}. If the optional {length} argument is given, writing will
stop after length (uncompressed) bytes have been written or the end of string
is reached, whichever comes first.
==============================================================================
Calendar *php-calendar*
*cal_days_in_month()* >
int cal_days_in_month(int calendar, int month, int year)
This function will return the number of days in the {month} of {year} for the
specified {calendar}.
*cal_from_jd()* >
array cal_from_jd(int jd, int calendar)
|cal_from_jd| converts the Julian day given in {jd} into a date of the
specified {calendar}. Supported {calendar} values are CAL_GREGORIAN,
CAL_JULIAN, CAL_JEWISH and CAL_FRENCH.
*cal_info()* >
array cal_info( [int calendar])
|cal_info| returns information on the specified {calendar}.
*cal_to_jd()* >
int cal_to_jd(int calendar, int month, int day, int year)
|cal_to_jd| calculates the Julian day count for a date in the specified
{calendar}. Supported {calendar}s are CAL_GREGORIAN, CAL_JULIAN, CAL_JEWISH
and CAL_FRENCH.
*easter_date()* >
int easter_date( [int year])
Returns the Unix timestamp corresponding to midnight on Easter of the given
year.
*easter_days()* >
int easter_days( [int year [, int method]])
Returns the number of days after March 21 on which Easter falls for a given
year. If no year is specified, the current year is assumed.
*frenchtojd()* >
int frenchtojd(int month, int day, int year)
Converts a date from the French Republican Calendar to a Julian Day Count.
*gregoriantojd()* >
int gregoriantojd(int month, int day, int year)
Valid Range for Gregorian Calendar 4714 B.C. to 9999 A.D.
*jddayofweek()* >
mixed jddayofweek(int julianday [, int mode])
Returns the day of the week. Can return a string or an integer depending on
the mode. Calendar week modes Mode Meaning 0 (Default) Returns the day number
as an int (0=Sunday, 1=Monday, etc) 1 Returns string containing the day of
week (English-Gregorian) 2 Returns a string containing the abbreviated day of
week (English-Gregorian)
*jdmonthname()* >
string jdmonthname(int julianday, int mode)
Returns a string containing a month name. {mode} tells this function which
calendar to convert the Julian Day Count to, and what type of month names are
to be returned. Calendar modes Mode Meaning Values 0 Gregorian - abbreviated
Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec 1 Gregorian
January, February, March, April, May, June, July, August, September, October,
November, December 2 Julian - abbreviated Jan, Feb, Mar, Apr, May, Jun, Jul,
Aug, Sep, Oct, Nov, Dec 3 Julian January, February, March, April, May, June,
July, August, September, October, November, December 4 Jewish Tishri,
Heshvan, Kislev, Tevet, Shevat, AdarI, AdarII, Nisan, Iyyar, Sivan, Tammuz,
Av, Elul 5 French Republican Vendemiaire, Brumaire, Frimaire, Nivose,
Pluviose, Ventose, Germinal, Floreal, Prairial, Messidor, Thermidor,
Fructidor, Extra
*jdtofrench()* >
string jdtofrench(int juliandaycount)
Converts a Julian Day Count to the French Republican Calendar.
*jdtogregorian()* >
string jdtogregorian(int julianday)
Converts Julian Day Count to a string containing the Gregorian date in the
format of "month/day/year".
*jdtojewish()* >
string jdtojewish(int juliandaycount [, bool hebrew [, int fl]])
Converts a Julian Day Count to the Jewish Calendar.
*jdtojulian()* >
string jdtojulian(int julianday)
Converts Julian Day Count to a string containing the Julian Calendar Date in
the format of "month/day/year".
*jdtounix()* >
int jdtounix(int jday)
This function will return a Unix timestamp corresponding to the Julian Day
given in {jday} or FALSE if {jday} is not inside the Unix epoch (Gregorian
years between 1970 and 2037 or 2440588 <= {jday} <= 2465342 ). The time
returned is localtime (and not GMT).
*jewishtojd()* >
int jewishtojd(int month, int day, int year)
Although this function can handle dates all the way back to the year 1 (3761
B.C.), such use may not be meaningful. The Jewish calendar has been in use
for several thousand years, but in the early days there was no formula to
determine the start of a month. A new month was started when the new moon was
first observed.
*juliantojd()* >
int juliantojd(int month, int day, int year)
Valid Range for Julian Calendar 4713 B.C. to 9999 A.D.
*unixtojd()* >
int unixtojd( [int timestamp])
Return the Julian Day for a Unix {timestamp} (seconds since 1.1.1970), or for
the current day if no {timestamp} is given.
==============================================================================
Ccvs *php-ccvs*
*ccvs_add()* >
string ccvs_add(string session, string invoice, string argtype, string argval)
*ccvs_auth()* >
string ccvs_auth(string session, string invoice)
*ccvs_command()* >
string ccvs_command(string session, string type, string argval)
*ccvs_count()* >
int ccvs_count(string session, string type)
*ccvs_delete()* >
string ccvs_delete(string session, string invoice)
*ccvs_done()* >
string ccvs_done(string sess)
*ccvs_init()* >
string ccvs_init(string name)
*ccvs_lookup()* >
string ccvs_lookup(string session, string invoice, int inum)
*ccvs_new()* >
string ccvs_new(string session, string invoice)
*ccvs_report()* >
string ccvs_report(string session, string type)
*ccvs_return()* >
string ccvs_return(string session, string invoice)
*ccvs_reverse()* >
string ccvs_reverse(string session, string invoice)
*ccvs_sale()* >
string ccvs_sale(string session, string invoice)
*ccvs_status()* >
string ccvs_status(string session, string invoice)
*ccvs_textvalue()* >
string ccvs_textvalue(string session)
*ccvs_void()* >
string ccvs_void(string session, string invoice)
==============================================================================
Classkit *php-classkit*
*classkit_import()* >
array classkit_import(string filename)
{filename} The filename of the class method definitions to import
*classkit_method_add()* >
bool classkit_method_add(string classname, string methodname, string args, string code [, int flags])
{classname} The class to which this method will be added
*classkit_method_copy()* >
bool classkit_method_copy(string dClass, string dMethod, string sClass [, string sMethod])
{dClass} Destination class for copied method
*classkit_method_redefine()* >
bool classkit_method_redefine(string classname, string methodname, string args, string code [, int flags])
{classname} The class in which to redefine the method
*classkit_method_remove()* >
bool classkit_method_remove(string classname, string methodname)
{classname} The class in which to remove the method
*classkit_method_rename()* >
bool classkit_method_rename(string classname, string methodname, string newname)
{classname} The class in which to rename the method
==============================================================================
Classobj *php-classobj*
*call_user_method_array()* >
mixed call_user_method_array(string method_name, array paramarr)
The |call_user_method_array| function is deprecated as of PHP 4.1.0, use the
|call_user_func_array| variety with the array(&$obj, "method_name") syntax
instead.
*call_user_method()* >
mixed call_user_method(string method_name [, mixed parameter])
The |call_user_method| function is deprecated as of PHP 4.1.0, use the
|call_user_func| variety with the array(&$obj, "method_name") syntax instead.
*class_exists()* >
bool class_exists(string class_name [, bool autoload])
This function returns TRUE if the class given by {class_name} has been
defined, FALSE otherwise.
*get_class_methods()* >
array get_class_methods(mixed class_name)
This function returns an array of method names defined for the class specified
by {class_name}.
*get_class_vars()* >
array get_class_vars(string class_name)
This function will return an associative array of default properties of the
class. The resulting array elements are in the form of varname => value.
*get_class()* >
string get_class(object obj)
This function returns the name of the class of which the object {obj} is an
instance. Returns FALSE if {obj} is not an object.
*get_declared_classes()* >
array get_declared_classes()
This function returns an array of the names of the declared classes in the
current script.
*get_declared_interfaces()* >
array get_declared_interfaces()
This function returns an array of the names of the declared interfaces in the
current script.
*get_object_vars()* >
array get_object_vars(object obj)
This function returns an associative array of defined object properties for
the specified object {obj}.
*get_parent_class()* >
string get_parent_class(mixed obj)
If {obj} is an object, returns the name of the parent class of the class of
which {obj} is an instance.
*interface_exists()* >
bool interface_exists(string interface_name [, bool autoload])
This function returns TRUE if the interface given by {interface_name} has been
defined, FALSE otherwise.
*is_a()* >
bool is_a(object object, string class_name)
This function returns TRUE if the object is of this class or has this class as
one of its parents, FALSE otherwise.
*is_subclass_of()* >
bool is_subclass_of(mixed object, string class_name)
This function returns TRUE if the object {object}, belongs to a class which is
a subclass of {class_name}, FALSE otherwise.
*method_exists()* >
bool method_exists(object object, string method_name)
This function returns TRUE if the method given by {method_name} has been
defined for the given {object}, FALSE otherwise.
==============================================================================
Com *php-com*
*COM()* >
com COM(string module_name [, mixed server_name [, int codepage [, string typelib]]])
The COM class allows you to instantiate an OLE compatible COM object and call
its methods and access its properties.
*DOTNET()* >
string DOTNET(string class_name [, int codepage])
The DOTNET class allows you to instantiate a class from a .Net assembly and
call its methods and access its properties.
*VARIANT()* >
object VARIANT( [mixed value [, int type [, int codepage]]])
The VARIANT is COM's equivalent of the PHP zval; it is a structure that can
contain a value with a range of different possible types. The VARIANT class
provided by the COM extension allows you to have more control over the way
that PHP passes values to and from COM.
*com_addref()* >
void com_addref()
Increases the components reference counter.
*com_create_guid()* >
string com_create_guid()
Generates a Globally Unique Identifier (GUID) and returns it as a string. A
GUID is generated in the same way as DCE UUID's, except that the Microsoft
convention is to enclose a GUID in curly braces.
*com_event_sink()* >
bool com_event_sink(variant comobject, object sinkobject [, mixed sinkinterface])
Instructs COM to sink events generated by {comobject} into the PHP object
{sinkobject}. PHP will attempt to use the default dispinterface type
specified by the typelibrary associated with {comobject}, but you may
override this choice by setting {sinkinterface} to the name of the
dispinterface that you want to use.
*com_get_active_object()* >
variant com_get_active_object(string progid [, int code_page])
|com_get_active_object| is similar to creating a new instance of a object,
except that it will only return an object to your script if the object is
already running. OLE applications use something known as the Running Object
Table to allow well-known applications to be launched only once; this
function exposes the COM library function GetActiveObject() to get a handle
on a running instance.
*com_get()* >
mixed com_get(resource com_object, string property)
Returns the value of the {property} of the COM component referenced by
{com_object}. Returns FALSE on error.
*com_invoke()* >
mixed com_invoke(resource com_object, string function_name [, mixed function_parameters])
|com_invoke| invokes the method named {function_name} of the COM component
referenced by {com_object}. |com_invoke| returns FALSE on error, returns the
{function_name}'s return value on success. All the extra parameters
{function_parameters} are passed to the method {function_name}.
*com_isenum()* >
bool com_isenum(variant com_module)
Checks to see if a COM object can be enumerated using the Next() method hack.
Returns TRUE if it can, FALSE if it cannot. See class for more details on
these methods.
*com_load_typelib()* >
bool com_load_typelib(string typelib_name [, bool case_insensitive])
Loads a type-library and registers its constants in the engine, as though they
were defined using |define|. The {case_insensitive} behaves in the same way as
the parameter with the same name in the |define| function.
*com_load()* >
resource com_load(string module_name [, string server_name [, int codepage]])
Equivalent to using the new operator to create an instance of the class. You
should do that instead of calling this function.
*com_message_pump()* >
bool com_message_pump( [int timeoutms])
This function will sleep for up to {timeoutms} milliseconds, or until a
message arrives in the queue. If a message or messages arrives before the
timeout, they will be dispatched, and the function will return TRUE. If the
timeout occurs and no messages were processed, the return value will be
FALSE. If you do not specify a value for {timeoutms}, then 0 will be assumed.
A 0 value means that no waiting will be performed; if there are messages
pending they will be dispatched as before; if there are no messages pending,
the function will return FALSE immediately without sleeping.
*com_print_typeinfo()* >
bool com_print_typeinfo(object comobject [, string dispinterface [, bool wantsink]])
The purpose of this function is to help generate a skeleton class for use as
an event sink. You may also use it to generate a dump of any COM object,
provided that it supports enough of the introspection interfaces, and that
you know the name of the interface you want to display.
*com_propget()* >
void com_propget()
This function is an alias for |com_get|.
*com_propput()* >
void com_propput()
This function is an alias for |com_set|.
*com_propset()* >
void com_propset()
This function is an alias for |com_set|.
*com_release()* >
void com_release()
Decreases the components reference counter.
*com_set()* >
void com_set(resource com_object, string property, mixed value)
Sets the value of the {property} of the COM component referenced by
{com_object}. Returns the newly set value if succeeded, FALSE on error.
*variant_abs()* >
mixed variant_abs(mixed val)
Returns the absolute value of {val}.
*variant_add()* >
mixed variant_add(mixed left, mixed right)
Adds {left} to {right} using the following rules (taken from the MSDN
library), which correspond to those of Visual Basic: Variant Addition Rules
If Then Both expressions are of the string type Concatenation One expression
is a string type and the other a character Addition One expression is numeric
and the other is a string Addition Both expressions are numeric Addition
Either expression is NULL NULL is returned Both expressions are empty Integer
subtype is returned
*variant_and()* >
mixed variant_and(mixed left, mixed right)
Performs a bitwise AND operation, according to the following truth table; note
that this is slightly different from a regular AND operation. Variant AND
Rules If {left} is If {right} is then the result is TRUETRUETRUE
TRUEFALSEFALSE TRUENULLNULL FALSETRUEFALSE FALSEFALSEFALSE FALSENULLFALSE
NULLTRUENULL NULLFALSEFALSE NULLNULLNULL
*variant_cast()* >
variant variant_cast(variant variant, int type)
This function makes a copy of {variant} and then performs a variant cast
operation to force the copy to have the type given by {type}. {type} should
be one of the VT_XXX constants.
*variant_cat()* >
mixed variant_cat(mixed left, mixed right)
Concatenates {left} with {right} and returns the result.
*variant_cmp()* >
int variant_cmp(mixed left, mixed right [, int lcid [, int flags]])
Compares {left} with {right} and returns one of the following values: Variant
Comparision Results value meaning VARCMP_LT {left} is less than {right}
VARCMP_EQ {left} is equal to {right} VARCMP_GT {left} is greater than {right}
VARCMP_NULL Either {left}, {right} or both are NULL
*variant_date_from_timestamp()* >
variant variant_date_from_timestamp(int timestamp)
Converts {timestamp} from a unix timestamp value into a variant of type
VT_DATE. This allows easier interopability between the unix-ish parts of PHP
and COM.
*variant_date_to_timestamp()* >
int variant_date_to_timestamp(variant variant)
Converts {variant} from a VT_DATE (or similar) value into a unix timestamp.
This allows easier interopability between the unix-ish parts of PHP and COM.
*variant_div()* >
mixed variant_div(mixed left, mixed right)
Divides {left} by {right} and returns the result, subject to the following
rules: Variant Division Rules If Then Both expressions are of the string,
date, character, boolean type Double is returned One expression is a string
type and the other a character Division and a double is returned One
expression is numeric and the other is a string Division and a double is
returned. Both expressions are numeric Division and a double is returned
Either expression is NULL NULL is returned {right} is empty and {left} is
anything but empty A com_exception with code DISP_E_DIVBYZERO is thrown
{left} is empty and {right} is anything but empty. 0 as type double is
returned Both expressions are empty A com_exception with code DISP_E_OVERFLOW
is thrown
*variant_eqv()* >
mixed variant_eqv(mixed left, mixed right)
If each bit in {left} is equal to the corresponding bit in {right} then TRUE
is returned, otherwise FALSE is returned.
*variant_fix()* >
mixed variant_fix(mixed variant)
If {variant} is negative, then the first negative integer greater than or
equal to the variant is returned, otherwise returns the integer portion of
the value of {variant}.
*variant_get_type()* >
int variant_get_type(variant variant)
This function returns an integer value that indicates the type of {variant},
which can be an instance of , or classes. The return value can be compared to
one of the VT_XXX constants.
*variant_idiv()* >
mixed variant_idiv(mixed left, mixed right)
Converts {left} and {right} to integer values, and then performs integer
division according the following rules: Variant Integer Division Rules If
Then Both expressions are of the string, date, character, boolean type
Division and integer is returned One expression is a string type and the
other a character Division One expression is numeric and the other is a
string Division Both expressions are numeric Division Either expression is
NULL NULL is returned Both expressions are empty A com_exception with code
DISP_E_DIVBYZERO is thrown
*variant_imp()* >
mixed variant_imp(mixed left, mixed right)
Performs a bitwise implication operation, according to the following truth
table: Variant Implication Table If {left} is If {right} is then the result
is TRUETRUETRUE TRUEFALSETRUE TRUENULLTRUE FALSETRUETRUE FALSEFALSETRUE
FALSENULLTRUE NULLTRUETRUE NULLFALSENULL NULLNULLNULL
*variant_int()* >
mixed variant_int(mixed variant)
If {variant} is negative, then the first negative integer greater than or
equal to the variant is returned, otherwise returns the integer portion of
the value of {variant}.
*variant_mod()* >
mixed variant_mod(mixed left, mixed right)
Divides {left} by {right} and returns the remainder.
*variant_mul()* >
mixed variant_mul(mixed left, mixed right)
Multiplies {left} by {right} and returns the result, subject to the following
rules: Variant Multiplication Rules If Then Both expressions are of the
string, date, character, boolean type Multiplication One expression is a
string type and the other a character Multiplication One expression is
numeric and the other is a string Multiplication Both expressions are numeric
Multiplication Either expression is NULL NULL is returned Both expressions are
empty Empty string is returned
*variant_neg()* >
mixed variant_neg(mixed variant)
Performs logical negation of {variant} and returns the result.
*variant_not()* >
mixed variant_not(mixed variant)
Performs bitwise not negation on {variant} and returns the result. If
{variant} is NULL, the result will also be NULL.
*variant_or()* >
mixed variant_or(mixed left, mixed right)
Performs a bitwise OR operation, according to the following truth table; note
that this is slightly different from a regular OR operation. Variant OR Rules
If {left} is If {right} is then the result is TRUETRUETRUE TRUEFALSETRUE
TRUENULLTRUE FALSETRUETRUE FALSEFALSEFALSE FALSENULLNULL NULLTRUETRUE
NULLFALSENULL NULLNULLNULL
*variant_pow()* >
mixed variant_pow(mixed left, mixed right)
Returns the result of {left} to the power of {right}.
*variant_round()* >
mixed variant_round(mixed variant, int decimals)
Returns the value of {variant} rounded to {decimals} decimal places.
*variant_set_type()* >
void variant_set_type(variant variant, int type)
This function is similar to |variant_cast| except that the variant is modified
"in-place"; no new variant is created. The parameters for this function have
identical meaning to those of |variant_cast|.
*variant_set()* >
void variant_set(variant variant, mixed value)
Converts {value} to a variant and assigns it to the {variant} object; no new
variant object is created, and the old value of {variant} is freed/released.
*variant_sub()* >
mixed variant_sub(mixed left, mixed right)
Subtracts {right} from {left} using the following rules: Variant Subtraction
Rules If Then Both expressions are of the string type Subtraction One
expression is a string type and the other a character Subtraction One
expression is numeric and the other is a string Subtraction. Both expressions
are numeric Subtraction Either expression is NULL NULL is returned Both
expressions are empty Empty string is returned
*variant_xor()* >
mixed variant_xor(mixed left, mixed right)
Performs a logical exclusion, according to the following truth table: Variant
XOR Rules If {left} is If {right} is then the result is TRUETRUEFALSE
TRUEFALSETRUE FALSETRUETRUE FALSEFALSEFALSE NULLNULLNULL
==============================================================================
Cpdf *php-cpdf*
*cpdf_add_annotation()* >
bool cpdf_add_annotation(int pdf_document, float llx, float lly, float urx, float ury, string title, string content [, int mode])
The |cpdf_add_annotation| adds a note with the lower left corner at ({llx},
{lly}) and the upper right corner at ({urx}, {ury}). Returns TRUE on success
or FALSE on failure.;
*cpdf_add_outline()* >
int cpdf_add_outline(int pdf_document, int lastoutline, int sublevel, int open, int pagenr, string text)
The |cpdf_add_outline| function adds a bookmark with text {text} that points
to the current page.
*cpdf_arc()* >
bool cpdf_arc(int pdf_document, float radius, float start, float end [, int mode])
The |cpdf_arc| function draws an arc with center at point (x-coor, y-coor) and
radius {radius}, starting at angle {start} and ending at angle {end}. Returns
TRUE on success or FALSE on failure.;
*cpdf_begin_text()* >
bool cpdf_begin_text(int pdf_document)
The |cpdf_begin_text| function starts a text section. Returns TRUE on success
or FALSE on failure.; The created text section must be ended with
|cpdf_end_text|.
*cpdf_circle()* >
bool cpdf_circle(int pdf_document, float radius [, int mode])
The |cpdf_circle| function draws a circle with center at point (x-coor,
y-coor) and radius {radius}. Returns TRUE on success or FALSE on failure.;
*cpdf_clip()* >
bool cpdf_clip(int pdf_document)
The |cpdf_clip| function clips all drawing to the current path. Returns TRUE
on success or FALSE on failure.;
*cpdf_close()* >
bool cpdf_close(int pdf_document)
The |cpdf_close| function closes the pdf document. Returns TRUE on success or
FALSE on failure.; This should be the last function even after
|cpdf_finalize|, |cpdf_output_buffer| and |cpdf_save_to_file|.
*cpdf_closepath_fill_stroke()* >
bool cpdf_closepath_fill_stroke(int pdf_document)
The |cpdf_closepath_fill_stroke| function closes, fills the interior of the
current path with the current fill color and draws current path. Returns TRUE
on success or FALSE on failure.;
*cpdf_closepath_stroke()* >
bool cpdf_closepath_stroke(int pdf_document)
The |cpdf_closepath_stroke| function is a combination of |cpdf_closepath| and
|cpdf_stroke|. Then clears the path. Returns TRUE on success or FALSE on
failure.;
*cpdf_closepath()* >
bool cpdf_closepath(int pdf_document)
The |cpdf_closepath| function closes the current path. Returns TRUE on success
or FALSE on failure.;
*cpdf_continue_text()* >
bool cpdf_continue_text(int pdf_document, string text)
The |cpdf_continue_text| function outputs the string in {text} in the next
line. Returns TRUE on success or FALSE on failure.;
*cpdf_curveto()* >
bool cpdf_curveto(int pdf_document, float x1, float y1, float x2, float y2, float x3, float y3 [, int mode])
The |cpdf_curveto| function draws a Bezier curve from the current point to the
point ({x3}, {y3}) using ({x1}, {y1}) and ({x2}, {y2}) as control points.
Returns TRUE on success or FALSE on failure.;
*cpdf_end_text()* >
bool cpdf_end_text(int pdf_document)
The |cpdf_end_text| function ends a text section which was started with
|cpdf_begin_text|. Returns TRUE on success or FALSE on failure.;
*cpdf_fill_stroke()* >
bool cpdf_fill_stroke(int pdf_document)
The |cpdf_fill_stroke| function fills the interior of the current path with
the current fill color and draws current path. Returns TRUE on success or
FALSE on failure.;
*cpdf_fill()* >
bool cpdf_fill(int pdf_document)
The |cpdf_fill| function fills the interior of the current path with the
current fill color. Returns TRUE on success or FALSE on failure.;
*cpdf_finalize_page()* >
bool cpdf_finalize_page(int pdf_document, int page_number)
The |cpdf_finalize_page| function ends the page with page number
{page_number}. Returns TRUE on success or FALSE on failure.;
*cpdf_finalize()* >
bool cpdf_finalize(int pdf_document)
The |cpdf_finalize| function ends the document. You still have to call
|cpdf_close|. Returns TRUE on success or FALSE on failure.;
*cpdf_global_set_document_limits()* >
bool cpdf_global_set_document_limits(int maxpages, int maxfonts, int maximages, int maxannotations, int maxobjects)
The |cpdf_global_set_document_limits| function sets several document limits.
This function has to be called before |cpdf_open| to take effect. It sets the
limits for any document open afterwards. Returns TRUE on success or FALSE on
failure.;
*cpdf_import_jpeg()* >
int cpdf_import_jpeg(int pdf_document, string file_name, float angle, float width, float height, int gsave [, int mode])
The |cpdf_import_jpeg| function opens an image stored in the file with the
name {file_name}. The format of the image has to be jpeg. The image is placed
on the current page at position (x-coor, y-coor). The image is rotated by
{angle} degrees. {gsave} should be non-zero to allow this function to operate
correctly.
*cpdf_lineto()* >
bool cpdf_lineto(int pdf_document [, int mode])
The |cpdf_lineto| function draws a line from the current point to the point
with coordinates (x-coor, y-coor). Returns TRUE on success or FALSE on
failure.;
*cpdf_moveto()* >
bool cpdf_moveto(int pdf_document [, int mode])
The |cpdf_moveto| function set the current point to the coordinates x-coor and
y-coor. Returns TRUE on success or FALSE on failure.;
*cpdf_newpath()* >
bool cpdf_newpath(int pdf_document)
The |cpdf_newpath| starts a new path on the document given by the
{pdf_document} parameter. Returns TRUE on success or FALSE on failure.;
*cpdf_open()* >
int cpdf_open(int compression [, string filename [, array doc_limits]])
The |cpdf_open| function opens a new pdf document. The first parameter turns
document compression on if it is unequal to 0. The second optional parameter
sets the file in which the document is written. If it is omitted the document
is created in memory and can either be written into a file with the
|cpdf_save_to_file| or written to standard output with |cpdf_output_buffer|.
The return value will be needed in further versions of ClibPDF as the first
parameter in all other functions which are writing to the pdf document. The
ClibPDF library takes the filename "-" as a synonym for stdout. If PHP is
compiled as an apache module this will not work because the way ClibPDF
outputs to stdout does not work with apache. You can solve this problem by
skipping the filename and using |cpdf_output_buffer| to output the pdf
document.
*cpdf_output_buffer()* >
bool cpdf_output_buffer(int pdf_document)
The |cpdf_output_buffer| function outputs the pdf document to stdout. The
document has to be created in memory which is the case if |cpdf_open| has
been called with no filename parameter. Returns TRUE on success or FALSE on
failure.;
*cpdf_page_init()* >
bool cpdf_page_init(int pdf_document, int page_number, int orientation, float height, float width [, float unit])
The |cpdf_page_init| function starts a new page with height {height} and width
{width}. Returns TRUE on success or FALSE on failure.; The page has number
{page_number} and orientation {orientation}. {orientation} can be 0 for
portrait and 1 for landscape. The last optional parameter {unit} sets the
unit for the coordinate system. The value should be the number of postscript
points per unit. Since one inch is equal to 72 points, a value of 72 would
set the unit to one inch. The default is also 72.
*cpdf_place_inline_image()* >
bool cpdf_place_inline_image(int pdf_document, int image, float angle, float width, float height, int gsave [, int mode])
The |cpdf_place_inline_image| function places an image created with the PHP
image functions on the page at position (x-coor, y-coor). The image can be
scaled at the same time. Returns TRUE on success or FALSE on failure.;
*cpdf_rect()* >
bool cpdf_rect(int pdf_document, float width, float height [, int mode])
The |cpdf_rect| function draws a rectangle with its lower left corner at point
(x-coor, y-coor). This width is set to {width}. This height is set to
{height}. Returns TRUE on success or FALSE on failure.;
*cpdf_restore()* >
bool cpdf_restore(int pdf_document)
The |cpdf_restore| function restores the environment saved with |cpdf_save|.
It works like the postscript command grestore. Very useful if you want to
translate or rotate an object without effecting other objects. Returns TRUE
on success or FALSE on failure.;
*cpdf_rlineto()* >
bool cpdf_rlineto(int pdf_document [, int mode])
The |cpdf_rlineto| function draws a line from the current point to the
relative point with coordinates (x-coor, y-coor). Returns TRUE on success or
FALSE on failure.;
*cpdf_rmoveto()* >
bool cpdf_rmoveto(int pdf_document [, int mode])
The |cpdf_rmoveto| function set the current point relative to the coordinates
x-coor and y-coor. Returns TRUE on success or FALSE on failure.;
*cpdf_rotate_text()* >
bool cpdf_rotate_text(int pdfdoc, float angle)
*cpdf_rotate()* >
bool cpdf_rotate(int pdf_document, float angle)
The |cpdf_rotate| function set the rotation in degrees to {angle}. Returns
TRUE on success or FALSE on failure.;
*cpdf_save_to_file()* >
bool cpdf_save_to_file(int pdf_document, string filename)
The |cpdf_save_to_file| function outputs the pdf document into a file if it
has been created in memory. Returns TRUE on success or FALSE on failure.;
*cpdf_save()* >
bool cpdf_save(int pdf_document)
The |cpdf_save| function saves the current environment. It works like the
postscript command gsave. Very useful if you want to translate or rotate an
object without effecting other objects. Returns TRUE on success or FALSE on
failure.;
*cpdf_scale()* >
bool cpdf_scale(int pdf_document)
The |cpdf_scale| function set the scaling factor in both directions. Returns
TRUE on success or FALSE on failure.;
*cpdf_set_action_url()* >
bool cpdf_set_action_url(int pdfdoc, float xll, float yll, float xur, float xur, string url [, int mode])
*cpdf_set_char_spacing()* >
bool cpdf_set_char_spacing(int pdf_document, float space)
The |cpdf_set_char_spacing| function sets the spacing between characters.
Returns TRUE on success or FALSE on failure.;
*cpdf_set_creator()* >
bool cpdf_set_creator(int pdf_document, string creator)
The |cpdf_set_creator| function sets the creator of a pdf document. Returns
TRUE on success or FALSE on failure.;
*cpdf_set_current_page()* >
bool cpdf_set_current_page(int pdf_document, int page_number)
The |cpdf_set_current_page| function set the page on which all operations are
performed. One can switch between pages until a page is finished with
|cpdf_finalize_page|. Returns TRUE on success or FALSE on failure.;
*cpdf_set_font_directories()* >
bool cpdf_set_font_directories(int pdfdoc, string pfmdir, string pfbdir)
*cpdf_set_font_map_file()* >
bool cpdf_set_font_map_file(int pdfdoc, string filename)
*cpdf_set_font()* >
bool cpdf_set_font(int pdf_document, string font_name, float size, string encoding)
The |cpdf_set_font| function sets the current font face, font size and
encoding. Currently only the standard postscript fonts are supported. Returns
TRUE on success or FALSE on failure.;
*cpdf_set_horiz_scaling()* >
bool cpdf_set_horiz_scaling(int pdf_document, float scale)
The |cpdf_set_horiz_scaling| function sets the horizontal scaling to {scale}
percent. Returns TRUE on success or FALSE on failure.;
*cpdf_set_keywords()* >
bool cpdf_set_keywords(int pdf_document, string keywords)
The |cpdf_set_keywords| function sets the keywords of a pdf document. Returns
TRUE on success or FALSE on failure.;
*cpdf_set_leading()* >
bool cpdf_set_leading(int pdf_document, float distance)
The |cpdf_set_leading| function sets the {distance} between text lines. This
will be used if text is output by |cpdf_continue_text|. Returns TRUE on
success or FALSE on failure.;
*cpdf_set_page_animation()* >
bool cpdf_set_page_animation(int pdf_document, int transition, float duration, float direction, int orientation, int inout)
The |cpdf_set_page_animation| function set the transition between following
pages. Returns TRUE on success or FALSE on failure.;
*cpdf_set_subject()* >
bool cpdf_set_subject(int pdf_document, string subject)
The |cpdf_set_subject| function sets the {subject} of a pdf document. Returns
TRUE on success or FALSE on failure.;
*cpdf_set_text_matrix()* >
bool cpdf_set_text_matrix(int pdf_document, array matrix)
The |cpdf_set_text_matrix| function sets a {matrix} which describes a
transformation applied on the current text font. Returns TRUE on success or
FALSE on failure.;
*cpdf_set_text_pos()* >
bool cpdf_set_text_pos(int pdf_document [, int mode])
The |cpdf_set_text_pos| function sets the position of text for the next
|cpdf_show| function call. Returns TRUE on success or FALSE on failure.;
*cpdf_set_text_rendering()* >
bool cpdf_set_text_rendering(int pdf_document, int rendermode)
The |cpdf_set_text_rendering| function determines how text is rendered.
Returns TRUE on success or FALSE on failure.;
*cpdf_set_text_rise()* >
bool cpdf_set_text_rise(int pdf_document, float value)
The |cpdf_set_text_rise| function sets the text rising to {value} units.
Returns TRUE on success or FALSE on failure.;
*cpdf_set_title()* >
bool cpdf_set_title(int pdf_document, string title)
The |cpdf_set_title| function sets the {title} of a pdf document. Returns TRUE
on success or FALSE on failure.;
*cpdf_set_viewer_preferences()* >
bool cpdf_set_viewer_preferences(int pdfdoc, array preferences)
*cpdf_set_word_spacing()* >
bool cpdf_set_word_spacing(int pdf_document, float space)
The |cpdf_set_word_spacing| function sets the spacing between words. Returns
TRUE on success or FALSE on failure.;
*cpdf_setdash()* >
bool cpdf_setdash(int pdf_document, float white, float black)
The |cpdf_setdash| function set the dash pattern {white} white units and
{black} black units. If both are 0 a solid line is set. Returns TRUE on
success or FALSE on failure.;
*cpdf_setflat()* >
bool cpdf_setflat(int pdf_document, float value)
The |cpdf_setflat| function set the flatness to a value between 0 and 100.
Returns TRUE on success or FALSE on failure.;
*cpdf_setgray_fill()* >
bool cpdf_setgray_fill(int pdf_document, float value)
The |cpdf_setgray_fill| function sets the current gray {value} to fill a path.
Returns TRUE on success or FALSE on failure.;
*cpdf_setgray_stroke()* >
bool cpdf_setgray_stroke(int pdf_document, float gray_value)
The |cpdf_setgray_stroke| function sets the current drawing color to the given
gray value. Returns TRUE on success or FALSE on failure.;
*cpdf_setgray()* >
bool cpdf_setgray(int pdf_document, float gray_value)
The |cpdf_setgray| function sets the current drawing and filling color to the
given gray value. Returns TRUE on success or FALSE on failure.;
*cpdf_setlinecap()* >
bool cpdf_setlinecap(int pdf_document, int value)
The |cpdf_setlinecap| function set the linecap parameter between a {value} of
0 and 2. 0 = butt end, 1 = round, 2 = projecting square. Returns TRUE on
success or FALSE on failure.;
*cpdf_setlinejoin()* >
bool cpdf_setlinejoin(int pdf_document, int value)
The |cpdf_setlinejoin| function set the linejoin parameter between a {value}
of 0 and 2. 0 = miter, 1 = round, 2 = bevel. Returns TRUE on success or FALSE
on failure.;
*cpdf_setlinewidth()* >
bool cpdf_setlinewidth(int pdf_document, float width)
The |cpdf_setlinewidth| function set the line width to {width}. Returns TRUE
on success or FALSE on failure.;
*cpdf_setmiterlimit()* >
bool cpdf_setmiterlimit(int pdf_document, float value)
The |cpdf_setmiterlimit| function set the miter limit to a value greater or
equal than 1. Returns TRUE on success or FALSE on failure.;
*cpdf_setrgbcolor_fill()* >
bool cpdf_setrgbcolor_fill(int pdf_document, float red_value, float green_value, float blue_value)
The |cpdf_setrgbcolor_fill| function sets the current rgb color value to fill
a path. Returns TRUE on success or FALSE on failure.;
*cpdf_setrgbcolor_stroke()* >
bool cpdf_setrgbcolor_stroke(int pdf_document, float red_value, float green_value, float blue_value)
The |cpdf_setrgbcolor_stroke| function sets the current drawing color to the
given rgb color value. Returns TRUE on success or FALSE on failure.;
*cpdf_setrgbcolor()* >
bool cpdf_setrgbcolor(int pdf_document, float red_value, float green_value, float blue_value)
The |cpdf_setrgbcolor| function sets the current drawing and filling color to
the given rgb color value. Returns TRUE on success or FALSE on failure.;
*cpdf_show_xy()* >
bool cpdf_show_xy(int pdf_document, string text [, int mode])
The |cpdf_show_xy| function outputs the string {text} at position with
coordinates (x-coor, y-coor). Returns TRUE on success or FALSE on failure.;
*cpdf_show()* >
bool cpdf_show(int pdf_document, string text)
The |cpdf_show| function outputs the string in {text} at the current position.
Returns TRUE on success or FALSE on failure.;
*cpdf_stringwidth()* >
float cpdf_stringwidth(int pdf_document, string text)
The |cpdf_stringwidth| function returns the width of the string in {text}. It
requires a font to be set before.
*cpdf_stroke()* >
bool cpdf_stroke(int pdf_document)
The |cpdf_stroke| function draws a line along current path. Returns TRUE on
success or FALSE on failure.;
*cpdf_text()* >
bool cpdf_text(int pdf_document, string text [, int mode [, float orientation [, int alignmode]]])
The |cpdf_text| function outputs the string {text} at position with
coordinates (x-coor, y-coor). Returns TRUE on success or FALSE on failure.;
*cpdf_translate()* >
bool cpdf_translate(int pdf_document)
The |cpdf_translate| function set the origin of coordinate system to the point
(x-coor, y-coor). Returns TRUE on success or FALSE on failure.;
==============================================================================
Crack *php-crack*
*crack_check()* >
bool crack_check(resource dictionary, string password)
Returns TRUE if {password} is strong, or FALSE otherwise.
*crack_closedict()* >
bool crack_closedict( [resource dictionary])
Returns TRUE on success or FALSE on failure.;
*crack_getlastmessage()* >
string crack_getlastmessage()
|crack_getlastmessage| returns the message from the last obscure check.
*crack_opendict()* >
resource crack_opendict(string dictionary)
Returns a dictionary resource identifier on success, or FALSE on failure.
==============================================================================
Ctype *php-ctype*
*ctype_alnum()* >
bool ctype_alnum(string text)
Returns TRUE if every character in {text} is either a letter or a digit, FALSE
otherwise. In the standard C locale letters are just [A-Za-z] and the function
is equivalent to preg_match('/^[a-z0-9]*$/i', $text).
*ctype_alpha()* >
bool ctype_alpha(string text)
Returns TRUE if every character in {text} is a letter from the current locale,
FALSE otherwise. In the standard C locale letters are just [A-Za-z] and
|ctype_alpha| is equivalent to (ctype_upper($text) || ctype_lower($text)) if
$text is just a single character, but other languages have letters that are
considered neither upper nor lower case.
*ctype_cntrl()* >
bool ctype_cntrl(string text)
Returns TRUE if every character in {text} has a special control function,
FALSE otherwise. Control characters are e.g. line feed, tab, esc.
*ctype_digit()* >
bool ctype_digit(string text)
Returns TRUE if every character in {text} is a decimal digit, FALSE otherwise.
*ctype_graph()* >
bool ctype_graph(string text)
Returns TRUE if every character in {text} is printable and actually creates
visible output (no white space), FALSE otherwise.
*ctype_lower()* >
bool ctype_lower(string text)
Returns TRUE if every character in {text} is a lowercase letter in the current
locale.
*ctype_print()* >
bool ctype_print(string text)
Returns TRUE if every character in {text} will actually create output
(including blanks). Returns FALSE if {text} contains control characters or
characters that do not have any output or control function at all.
*ctype_punct()* >
bool ctype_punct(string text)
Returns TRUE if every character in {text} is printable, but neither letter,
digit or blank, FALSE otherwise.
*ctype_space()* >
bool ctype_space(string text)
Returns TRUE if every character in {text} creates some sort of white space,
FALSE otherwise. Besides the blank character this also includes tab, vertical
tab, line feed, carriage return and form feed characters.
*ctype_upper()* >
bool ctype_upper(string text)
Returns TRUE if every character in {text} is an uppercase letter in the
current locale.
*ctype_xdigit()* >
bool ctype_xdigit(string text)
Returns TRUE if every character in {text} is a hexadecimal 'digit', that is a
decimal digit or a character from [A-Fa-f] , FALSE otherwise.
==============================================================================
Curl *php-curl*
*curl_close()* >
void curl_close(resource ch)
This function closes a CURL session and frees all resources. The CURL handle,
{ch}, is also deleted.
*curl_copy_handle()* >
resource curl_copy_handle(resource ch)
*curl_errno()* >
int curl_errno(resource ch)
Returns the error number for the last cURL operation on the resource {ch}, or
0 (zero) if no error occurred.
*curl_error()* >
string curl_error(resource ch)
Returns a clear text error message for the last cURL operation on the resource
{ch}, or '' (the empty string) if no error occurred.
*curl_exec()* >
mixed curl_exec(resource ch)
This function should be called after you initialize a CURL session and all the
options for the session are set. Its purpose is simply to execute the
predefined CURL session (given by the {ch}). Initializing a new CURL session
and fetching a webpage ]]>
*curl_getinfo()* >
string curl_getinfo(resource ch [, int opt])
Returns information about the last transfer, {opt} may be one of the
following: "CURLINFO_EFFECTIVE_URL" - Last effective URL "CURLINFO_HTTP_CODE"
- Last received HTTP code "CURLINFO_FILETIME" - Remote time of the retrieved
document, if -1 is returned the time of the document is unknown
"CURLINFO_TOTAL_TIME" - Total transaction time in seconds for last transfer
"CURLINFO_NAMELOOKUP_TIME" - Time in seconds until name resolving was
complete "CURLINFO_CONNECT_TIME" - Time in seconds it took to establish the
connection "CURLINFO_PRETRANSFER_TIME" - Time in seconds from start until
just before file transfer begins "CURLINFO_STARTTRANSFER_TIME" - Time in
seconds until the first byte is about to be transferred
"CURLINFO_REDIRECT_TIME" - Time in seconds of all redirection steps before
final transaction was started "CURLINFO_SIZE_UPLOAD" - Total number of bytes
uploaded "CURLINFO_SIZE_DOWNLOAD" - Total number of bytes downloaded
"CURLINFO_SPEED_DOWNLOAD" - Average download speed "CURLINFO_SPEED_UPLOAD" -
Average upload speed "CURLINFO_HEADER_SIZE" - Total size of all headers
received "CURLINFO_REQUEST_SIZE" - Total size of issued requests, currently
only for HTTP requests "CURLINFO_SSL_VERIFYRESULT" - Result of SSL
certification verification requested by setting CURLOPT_SSL_VERIFYPEER
"CURLINFO_CONTENT_LENGTH_DOWNLOAD" - content-length of download, read from
Content-Length: field "CURLINFO_CONTENT_LENGTH_UPLOAD" - Specified size of
upload "CURLINFO_CONTENT_TYPE" - Content-type of downloaded object, NULL
indicates server did not send valid Content-Type: header
*curl_init()* >
resource curl_init( [string url])
The |curl_init| will initialize a new session and return a CURL handle for use
with the |curl_setopt|, |curl_exec|, and |curl_close| functions. If the
optional {url} parameter is supplied then the CURLOPT_URL option will be set
to the value of the parameter. You can manually set this using the
|curl_setopt| function. Initializing a new CURL session and fetching a
webpage ]]>
*curl_multi_add_handle()* >
int curl_multi_add_handle(resource mh, resource ch)
See also |curl_multi_init|, |curl_init|, and |curl_multi_remove_handle|.
*curl_multi_close()* >
void curl_multi_close(resource mh)
See also |curl_multi_init| and |curl_close|.
*curl_multi_exec()* >
int curl_multi_exec(resource mh)
See also |curl_multi_init| and |curl_exec|.
*curl_multi_getcontent()* >
string curl_multi_getcontent(resource ch)
See also |curl_multi_init|.
*curl_multi_info_read()* >
array curl_multi_info_read(resource mh)
See also |curl_multi_init|.
*curl_multi_init()* >
resource curl_multi_init()
See also |curl_init| and |curl_multi_close|.
*curl_multi_remove_handle()* >
int curl_multi_remove_handle(resource mh, resource ch)
See also |curl_multi_init|, |curl_init|, and |curl_multi_add_handle|.
*curl_multi_select()* >
int curl_multi_select(resource mh [, float timeout])
See also |curl_multi_init|.
*curl_setopt()* >
bool curl_setopt(resource ch, int option, mixed value)
Set an option for a CURL session identified by the {ch} parameter. {option}
specifies which option to set, and {value} specifies the value for the option
given.
*curl_version()* >
string curl_version( [int version])
The |curl_version| function returns a string containing the current CURL
version.
==============================================================================
Cybercash *php-cybercash*
*cybercash_base64_decode()* >
string cybercash_base64_decode(string inbuff)
*cybercash_base64_encode()* >
string cybercash_base64_encode(string inbuff)
*cybercash_decr()* >
array cybercash_decr(string wmk, string sk, string inbuff)
The function returns an associative array with the elements "errcode" and, if
"errcode" is FALSE, "outbuff" (string), "outLth" (long) and "macbuff"
(string).
*cybercash_encr()* >
array cybercash_encr(string wmk, string sk, string inbuff)
The function returns an associative array with the elements "errcode" and, if
"errcode" is FALSE, "outbuff" (string), "outLth" (long) and "macbuff"
(string).
==============================================================================
Cybermut *php-cybermut*
==============================================================================
Cyrus *php-cyrus*
*cyrus_authenticate()* >
bool cyrus_authenticate(resource connection [, string mechlist [, string service [, string user [, int minssf [, int maxssf [, string authname [, string password]]]]]]])
*cyrus_bind()* >
bool cyrus_bind(resource connection, array callbacks)
*cyrus_close()* >
bool cyrus_close(resource connection)
*cyrus_connect()* >
resource cyrus_connect( [string host [, string port [, int flags]]])
*cyrus_query()* >
bool cyrus_query(resource connection, string query)
*cyrus_unbind()* >
bool cyrus_unbind(resource connection, string trigger_name)
==============================================================================
Datetime *php-datetime*
*checkdate()* >
bool checkdate(int month, int day, int year)
Returns TRUE if the date given is valid; otherwise returns FALSE. Checks the
validity of the date formed by the arguments. A date is considered valid if:
year is between 1 and 32767 inclusive month is between 1 and 12 inclusive
{Day} is within the allowed number of days for the given {month}. Leap
{year}s are taken into consideration.
*date_sunrise()* >
mixed date_sunrise(int timestamp [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])
|date_sunrise| returns the sunrise time for a given day (specified as a
{timestamp}) and location. The {latitude}, {longitude} and {zenith}
parameters default to the date.default_latitude, date.default_longitude and
date.sunrise_zenith configuration options, respectively.
*date_sunset()* >
mixed date_sunset(int timestamp [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])
|date_sunset| returns the sunset time for a given day (specified as a
{timestamp}) and location. The {latitude}, {longitude} and {zenith}
parameters default to the date.default_latitude, date.default_longitude and
date.sunset_zenith configuration options, respectively.
*date()* >
string date(string format [, int timestamp])
Returns a string formatted according to the given format string using the
given integer {timestamp} or the current local time if no timestamp is given.
In otherwords, {timestamp} is optional and defaults to the value of |time|.
The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54
GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond to
the minimum and maximum values for a 32-bit signed integer). On Windows this
range is limited from 01-01-1970 to 19-01-2038.
*getdate()* >
array getdate( [int timestamp])
Returns an associative array containing the date information of the
{timestamp}, or the current local time if no {timestamp} is given, as the
following associative array elements:
*gettimeofday()* >
mixed gettimeofday( [bool return_float])
This is an interface to gettimeofday(2). It returns an associative array
containing the data returned from the system call.
*gmdate()* >
string gmdate(string format [, int timestamp])
Identical to the |date| function except that the time returned is Greenwich
Mean Time (GMT). For example, when run in Finland (GMT +0200), the first line
below prints "Jan 01 1998 00:00:00", while the second prints "Dec 31 1997
22:00:00". |gmdate| example ]]>
*gmmktime()* >
int gmmktime( [int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]])
Identical to |mktime| except the passed parameters represents a GMT date.
*gmstrftime()* >
string gmstrftime(string format [, int timestamp])
Behaves the same as |strftime| except that the time returned is Greenwich Mean
Time (GMT). For example, when run in Eastern Standard Time (GMT -0500), the
first line below prints "Dec 31 1998 20:00:00", while the second prints "Jan
01 1999 01:00:00". |gmstrftime| example ]]>
*idate()* >
int idate(string format [, int timestamp])
Returns a string formatted according to the given format string using the
given integer {timestamp} or the current local time if no timestamp is given.
In other words, {timestamp} is optional and defaults to the value of |time|.
*localtime()* >
array localtime( [int timestamp [, bool is_associative]])
The |localtime| function returns an array identical to that of the structure
returned by the C function call. The first argument to |localtime| is the
timestamp, if this is not given the current time as returned from |time| is
used. The second argument to the |localtime| is the {is_associative}, if this
is set to 0 or not supplied than the array is returned as a regular,
numerically indexed array. If the argument is set to 1 then |localtime| is an
associative array containing all the different elements of the structure
returned by the C function call to localtime. The names of the different keys
of the associative array are as follows: "tm_sec" - seconds "tm_min" - minutes
"tm_hour" - hour "tm_mday" - day of the month "tm_mon" - month of the year,
starting with 0 for January "tm_year" - Years since 1900 "tm_wday" - Day of
the week "tm_yday" - Day of the year "tm_isdst" - Is daylight savings time in
effect
*microtime()* >
mixed microtime( [bool get_as_float])
|microtime| returns the current Unix timestamp with microseconds. This
function is only available on operating systems that support the
gettimeofday() system call.
*mktime()* >
int mktime( [int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]])
Warning: Note the strange order of arguments, which differs from the order of
arguments in a regular Unix mktime() call and which does not lend itself well
to leaving out parameters from right to left (see below). It is a common error
to mix these values up in a script.
*strftime()* >
string strftime(string format [, int timestamp])
Returns a string formatted according to the given format string using the
given {timestamp} or the current local time if no timestamp is given. Month
and weekday names and other language dependent strings respect the current
locale set with |setlocale|.
*strptime()* >
array strptime(string timestamp, string format)
|strptime| returns an array with the {timestamp} parsed, or FALSE on error.
*strtotime()* >
int strtotime(string time [, int now])
The function expects to be given a string containing an English date format
and will try to parse that format into a Unix timestamp relative to the
timestamp given in {now}, or the current time if none is supplied. Upon
failure, -1 is returned.
*time()* >
int time()
Returns the current time measured in the number of seconds since the Unix
Epoch (January 1 1970 00:00:00 GMT).
==============================================================================
Dba *php-dba*
*dba_close()* >
void dba_close(resource handle)
|dba_close| closes the established database and frees all resources specified
by {handle}.
*dba_delete()* >
bool dba_delete(string key, resource handle)
|dba_delete| deletes the entry specified by {key} from the database specified
with {handle}.
*dba_exists()* >
bool dba_exists(string key, resource handle)
|dba_exists| checks whether the specified {key} exists in the database
specified by {handle}.
*dba_fetch()* >
string dba_fetch(string key, resource handle)
|dba_fetch| fetches the data specified by {key} from the database specified
with {handle}.
*dba_firstkey()* >
string dba_firstkey(resource handle)
|dba_firstkey| returns the first key of the database specified by {handle} and
resets the internal key pointer. This permits a linear search through the
whole database.
*dba_handlers()* >
array dba_handlers( [bool full_info])
|dba_handlers| returns an array with all handlers supported by this extension.
*dba_insert()* >
bool dba_insert(string key, string value, resource handle)
|dba_insert| inserts the entry described with {key} and {value} into the
database specified by {handle}. It fails, if an entry with the same {key}
already exists.
*dba_key_split()* >
mixed dba_key_split(mixed key)
|dba_key_split| returns an array of the form array(0=>group,1=>value_name).
This function will return FALSE if {key} is NULL or FALSE.
*dba_list()* >
array dba_list()
|dba_list| returns an associative array with all open database files. This
array is in the form: resourceid=>filename.
*dba_nextkey()* >
string dba_nextkey(resource handle)
|dba_nextkey| returns the next key of the database specified by {handle} and
advances the internal key pointer.
*dba_open()* >
resource dba_open(string path, string mode, string handler)
|dba_open| establishes a database instance for {path} with {mode} using
{handler}.
*dba_optimize()* >
bool dba_optimize(resource handle)
|dba_optimize| optimizes the underlying database specified by {handle}.
*dba_popen()* >
resource dba_popen(string path, string mode, string handler)
|dba_popen| establishes a persistent database instance for {path} with {mode}
using {handler}.
*dba_replace()* >
bool dba_replace(string key, string value, resource handle)
|dba_replace| replaces or inserts the entry described with {key} and {value}
into the database specified by {handle}.
*dba_sync()* >
bool dba_sync(resource handle)
|dba_sync| synchronizes the database specified by {handle}. This will probably
trigger a physical write to disk, if supported.
==============================================================================
Dbase *php-dbase*
*dbase_add_record()* >
bool dbase_add_record(int dbase_identifier, array record)
Adds the data in the {record} to the database. If the number of items in the
supplied record isn't equal to the number of fields in the database, the
operation will fail and FALSE will be returned.
*dbase_close()* >
bool dbase_close(int dbase_identifier)
Closes the database associated with {dbase_identifier}.
*dbase_create()* >
int dbase_create(string filename, array fields)
|dbase_create| creates a dBase database in the file {filename}, with the
fields {fields}.
*dbase_delete_record()* >
bool dbase_delete_record(int dbase_identifier, int record)
Marks {record} to be deleted from the database. To actually remove the record
from the database, you must also call |dbase_pack|.
*dbase_get_header_info()* >
array dbase_get_header_info(int dbase_identifier)
Returns information on the column structure of the database referenced by
{dbase_identifier}. For each column in the database, there is an entry in a
numerically-indexed array. The array index starts at 0. Each array element
contains an associative array of column information. If the database header
information cannot be read, FALSE is returned.
*dbase_get_record_with_names()* >
array dbase_get_record_with_names(int dbase_identifier, int record)
Returns the data from {record} in an associative array. The array also
includes an associative member named 'deleted' which is set to 1 if the
record has been marked for deletion (see |dbase_delete_record|).
*dbase_get_record()* >
array dbase_get_record(int dbase_identifier, int record)
Returns the data from {record} in an array. The array is indexed starting at
0, and includes an associative member named 'deleted' which is set to 1 if
the record has been marked for deletion (see |dbase_delete_record|.
*dbase_numfields()* >
int dbase_numfields(int dbase_identifier)
Returns the number of fields (columns) in the specified database. Field
numbers are between 0 and dbase_numfields($db)-1, while record numbers are
between 1 and dbase_numrecords($db). Using |dbase_numfields| \n"; } ?> ]]>
*dbase_numrecords()* >
int dbase_numrecords(int dbase_identifier)
Returns the number of records (rows) in the specified database. Record numbers
are between 1 and dbase_numrecords($db), while field numbers are between 0 and
dbase_numfields($db)-1.
*dbase_open()* >
int dbase_open(string filename, int flags)
Returns a dbase_identifier for the opened database, or FALSE if the database
couldn't be opened.
*dbase_pack()* >
bool dbase_pack(int dbase_identifier)
Packs the specified database (permanently deleting all records marked for
deletion using |dbase_delete_record|).
*dbase_replace_record()* >
bool dbase_replace_record(int dbase_identifier, array record, int dbase_record_number)
Replaces the data associated with the record {record_number} with the data in
the {record} in the database. If the number of items in the supplied record
is not equal to the number of fields in the database, the operation will fail
and FALSE will be returned.
==============================================================================
Dbm *php-dbm*
*dblist()* >
string dblist()
Getting the information on the command line
*dbmclose()* >
bool dbmclose(resource dbm_identifier)
Unlocks and closes the specified database.
*dbmdelete()* >
bool dbmdelete(resource dbm_identifier, string key)
Deletes the value for {key} in the database.
*dbmexists()* >
bool dbmexists(resource dbm_identifier, string key)
Returns TRUE if there is a value associated with the {key}.
*dbmfetch()* >
string dbmfetch(resource dbm_identifier, string key)
Returns the value associated with {key}.
*dbmfirstkey()* >
string dbmfirstkey(resource dbm_identifier)
Returns the first key in the database. Note that no particular order is
guaranteed since the database may be built using a hash-table, which doesn't
guarantee any ordering.
*dbminsert()* >
int dbminsert(resource dbm_identifier, string key, string value)
Adds the value to the database with the specified key.
*dbmnextkey()* >
string dbmnextkey(resource dbm_identifier, string key)
Returns the next key after {key}. By calling |dbmfirstkey| followed by
successive calls to |dbmnextkey| it is possible to visit every key/value pair
in the dbm database. For example: Visiting every key/value pair in a DBM
database ]]>
*dbmopen()* >
resource dbmopen(string filename, string flags)
The first argument is the full-path filename of the DBM file to be opened and
the second is the file open mode which is one of "r", "n", "c" or "w" for
read-only, new (implies read-write, and most likely will truncate an
already-existing database of the same name), create (implies read-write, and
will not truncate an already-existing database of the same name) and
read-write respectively.
*dbmreplace()* >
int dbmreplace(resource dbm_identifier, string key, string value)
Replaces the value for the specified key in the database.
==============================================================================
Dbplus *php-dbplus*
*dbplus_add()* >
int dbplus_add(resource relation, array tuple)
This function will add a tuple to a relation. The {tuple} data is an array of
attribute/value pairs to be inserted into the given {relation}. After
successful execution the {tuple} array will contain the complete data of the
newly created tuple, including all implicitly set domain fields like
sequences.
*dbplus_aql()* >
resource dbplus_aql(string query [, string server [, string dbpath]])
|dbplus_aql| will execute an AQL {query} on the given {server} and {dbpath}.
*dbplus_chdir()* >
string dbplus_chdir( [string newdir])
|dbplus_chdir| will change the virtual current directory where relation files
will be looked for by |dbplus_open|. |dbplus_chdir| will return the absolute
path of the current directory. Calling |dbplus_chdir| without giving any
{newdir} may be used to query the current working directory.
*dbplus_close()* >
int dbplus_close(resource relation)
Calling |dbplus_close| will close a relation previously opened by
|dbplus_open|.
*dbplus_curr()* >
int dbplus_curr(resource relation)
|dbplus_curr| will read the data for the current tuple for the given
{relation} and will pass it back as an associative array in {tuple}.
*dbplus_errcode()* >
string dbplus_errcode( [int errno])
|dbplus_errcode| returns a cleartext error string for the error code passed as
{errno} of for the result code of the last db++ operation if no parameter is
given.
*dbplus_errno()* >
int dbplus_errno()
|dbplus_errno| will return the error code returned by the last db++ operation.
*dbplus_find()* >
int dbplus_find(resource relation, array constraints, mixed tuple)
|dbplus_find| will place a constraint on the given relation. Further calls to
functions like |dbplus_curr| or |dbplus_next| will only return tuples
matching the given constraints.
*dbplus_first()* >
int dbplus_first(resource relation)
|dbplus_curr| will read the data for the first tuple for the given {relation},
make it the current tuple and pass it back as an associative array in {tuple}.
*dbplus_flush()* >
int dbplus_flush(resource relation)
|dbplus_flush| will write all changes applied to {relation} since the last
flush to disk.
*dbplus_freealllocks()* >
int dbplus_freealllocks()
|dbplus_freealllocks| will free all tuple locks held by this client.
*dbplus_freelock()* >
int dbplus_freelock(resource relation, string tname)
|dbplus_freelock| will release a write lock on the given {tuple} previously
obtained by |dbplus_getlock|.
*dbplus_freerlocks()* >
int dbplus_freerlocks(resource relation)
|dbplus_freerlocks| will free all tuple locks held on the given {relation}.
*dbplus_getlock()* >
int dbplus_getlock(resource relation, string tname)
|dbplus_getlock| will request a write lock on the specified {tuple}. It will
return zero on success or a non-zero error code, especially
DBPLUS_ERR_WLOCKED, on failure.
*dbplus_getunique()* >
int dbplus_getunique(resource relation, int uniqueid)
|dbplus_getunique| will obtain a number guaranteed to be unique for the given
{relation} and will pass it back in the variable given as {uniqueid}.
*dbplus_info()* >
int dbplus_info(resource relation, string key)
*dbplus_last()* >
int dbplus_last(resource relation)
|dbplus_curr| will read the data for the last tuple for the given {relation},
make it the current tuple and pass it back as an associative array in
{tuple}.
*dbplus_lockrel()* >
int dbplus_lockrel(resource relation)
|dbplus_lockrel| will request a write lock on the given relation. Other
clients may still query the relation, but can't alter it while it is locked.
*dbplus_next()* >
int dbplus_next(resource relation)
|dbplus_curr| will read the data for the next tuple for the given {relation},
will make it the current tuple and will pass it back as an associative array
in {tuple}.
*dbplus_open()* >
resource dbplus_open(string name)
The relation file {name} will be opened. {name} can be either a file name or a
relative or absolute path name. This will be mapped in any case to an absolute
relation file path on a specific host machine and server.
*dbplus_prev()* >
int dbplus_prev(resource relation)
|dbplus_curr| will read the data for the previous tuple for the given
{relation}, will make it the current tuple and will pass it back as an
associative array in {tuple}.
*dbplus_rchperm()* >
int dbplus_rchperm(resource relation, int mask, string user, string group)
|dbplus_rchperm| will change access permissions as specified by {mask}, {user}
and {group}. The values for these are operating system specific.
*dbplus_rcreate()* >
resource dbplus_rcreate(string name, mixed domlist [, bool overwrite])
|dbplus_rcreate| will create a new relation named {name}. An existing relation
by the same name will only be overwritten if the relation is currently not in
use and {overwrite} is set to TRUE.
*dbplus_rcrtexact()* >
resource dbplus_rcrtexact(string name, resource relation [, bool overwrite])
|dbplus_rcrtexact| will create an exact but empty copy of the given {relation}
under a new {name}. An existing relation by the same {name} will only be
overwritten if {overwrite} is TRUE and no other process is currently using
the relation.
*dbplus_rcrtlike()* >
resource dbplus_rcrtlike(string name, resource relation [, int overwrite])
|dbplus_rcrtexact| will create an empty copy of the given {relation} under a
new {name}, but with default indices. An existing relation by the same {name}
will only be overwritten if {overwrite} is TRUE and no other process is
currently using the relation.
*dbplus_resolve()* >
int dbplus_resolve(string relation_name)
|dbplus_resolve| will try to resolve the given {relation_name} and find out
internal server id, real hostname and the database path on this host. The
function will return an array containing these values under the keys 'sid',
'host' and 'host_path' or FALSE on error.
*dbplus_restorepos()* >
int dbplus_restorepos(resource relation, array tuple)
*dbplus_rkeys()* >
resource dbplus_rkeys(resource relation, mixed domlist)
|dbplus_rkeys| will replace the current primary key for {relation} with the
combination of domains specified by {domlist}.
*dbplus_ropen()* >
resource dbplus_ropen(string name)
|dbplus_ropen| will open the relation {file} locally for quick access without
any client/server overhead. Access is read only and only |dbplus_current| and
|dbplus_next| may be applied to the returned relation.
*dbplus_rquery()* >
int dbplus_rquery(string query [, string dbpath])
|dbplus_rquery| performs a local (raw) AQL query using an AQL interpreter
embedded into the db++ client library. |dbplus_rquery| is faster than
|dbplus_aql| but will work on local data only.
*dbplus_rrename()* >
int dbplus_rrename(resource relation, string name)
|dbplus_rrename| will change the name of {relation} to {name}.
*dbplus_rsecindex()* >
resource dbplus_rsecindex(resource relation, mixed domlist, int type)
|dbplus_rsecindex| will create a new secondary index for {relation} with
consists of the domains specified by {domlist} and is of type {type}
*dbplus_runlink()* >
int dbplus_runlink(resource relation)
|dbplus_unlink| will close and remove the {relation}.
*dbplus_rzap()* >
int dbplus_rzap(resource relation)
|dbplus_rzap| will remove all tuples from {relation}.
*dbplus_savepos()* >
int dbplus_savepos(resource relation)
*dbplus_setindex()* >
int dbplus_setindex(resource relation, string idx_name)
*dbplus_setindexbynumber()* >
int dbplus_setindexbynumber(resource relation, int idx_number)
*dbplus_sql()* >
resource dbplus_sql(string query [, string server [, string dbpath]])
*dbplus_tcl()* >
int dbplus_tcl(int sid, string script)
A db++ server will prepare a TCL interpreter for each client connection. This
interpreter will enable the server to execute TCL code provided by the client
as a sort of stored procedures to improve the performance of database
operations by avoiding client/server data transfers and context switches.
*dbplus_tremove()* >
int dbplus_tremove(resource relation, array tuple)
|dbplus_tremove| removes {tuple} from {relation} if it perfectly matches a
tuple within the relation. {current}, if given, will contain the data of the
new current tuple after calling |dbplus_tremove|.
*dbplus_undo()* >
int dbplus_undo(resource relation)
*dbplus_undoprepare()* >
int dbplus_undoprepare(resource relation)
*dbplus_unlockrel()* >
int dbplus_unlockrel(resource relation)
|dbplus_unlockrel| will release a write lock previously obtained by
|dbplus_lockrel|.
*dbplus_unselect()* >
int dbplus_unselect(resource relation)
Calling |dbplus_unselect| will remove a constraint previously set by
|dbplus_find| on {relation}.
*dbplus_update()* >
int dbplus_update(resource relation, array old, array new)
|dbplus_update| replaces the tuple given by {old} with the data from {new} if
and only if {old} completely matches a tuple within {relation}.
*dbplus_xlockrel()* >
int dbplus_xlockrel(resource relation)
|dbplus_xlockrel| will request an exclusive lock on {relation} preventing even
read access from other clients.
*dbplus_xunlockrel()* >
int dbplus_xunlockrel(resource relation)
|dbplus_xunlockrel| will release an exclusive lock on {relation} previously
obtained by |dbplus_xlockrel|.
==============================================================================
Dbx *php-dbx*
*dbx_close()* >
bool dbx_close(object link_identifier)
Returns TRUE on success or FALSE on failure.;
*dbx_compare()* >
int dbx_compare(array row_a, array row_b, string column_key [, int flags])
|dbx_compare| returns 0 if the row_a[$column_key] is equal to
row_b[$column_key], and 1 or -1 if the former is greater or is smaller than
the latter one, respectively, or vice versa if the {flag} is set to
DBX_CMP_DESC. |dbx_compare| is a helper function for |dbx_sort| to ease the
make and use of the custom sorting function.
*dbx_connect()* >
object dbx_connect(mixed module, string host, string database, string username, string password [, int persistent])
|dbx_connect| returns an object on success, FALSE on error. If a connection
has been made but the database could not be selected, the connection is
closed and FALSE is returned. The {persistent} parameter can be set to
DBX_PERSISTENT, if so, a persistent connection will be created.
*dbx_error()* >
string dbx_error(object link_identifier)
|dbx_error| returns a string containing the error message from the last
function call of the abstracted module (e.g. mysql module). If there are
multiple connections in the same module, just the last error is given. If
there are connections on different modules, the latest error is returned for
the module specified by the {link_identifier} parameter.
*dbx_escape_string()* >
string dbx_escape_string(object link_identifier, string text)
|dbx_escape_string| returns the text, escaped where necessary (such as quotes,
backslashes etc). It returns NULL on error.
*dbx_fetch_row()* >
object dbx_fetch_row(object result_identifier)
|dbx_fetch_row| returns a row on success, and 0 on failure (e.g. when no more
rows are available). When the DBX_RESULT_UNBUFFERED is not set in the query,
|dbx_fetch_row| will fail as all rows have already been fetched into the
results data property.
*dbx_query()* >
object dbx_query(object link_identifier, string sql_statement [, int flags])
|dbx_query| returns an object or 1 on success, and 0 on failure. The result
object is returned only if the query given in {sql_statement} produces a
result set (i.e. a SELECT query, even if the result set is empty).
*dbx_sort()* >
bool dbx_sort(object result, string user_compare_function)
Returns TRUE on success or FALSE on failure.;
==============================================================================
Dio *php-dio*
*dio_close()* >
void dio_close(resource fd)
The function |dio_close| closes the file descriptor {fd}.
*dio_fcntl()* >
mixed dio_fcntl(resource fd, int cmd [, mixed args])
The |dio_fcntl| function performs the operation specified by {cmd} on the file
descriptor {fd}. Some commands require additional arguments {args} to be
supplied.
*dio_open()* >
resource dio_open(string filename, int flags [, int mode])
|dio_open| opens a file and returns a new file descriptor for it, or FALSE if
any error occurred. If {flags} is O_CREAT, the optional third parameter
{mode} will set the mode of the file (creation permissions). The {flags}
parameter can be one of the following options: O_RDONLY - opens the file for
read access.
*dio_read()* >
string dio_read(resource fd [, int n])
The function |dio_read| reads and returns {n} bytes from file with descriptor
{fd}. If {n} is not specified, |dio_read| reads 1K sized block and returns
them.
*dio_seek()* >
int dio_seek(resource fd, int pos [, int whence])
The function |dio_seek| is used to change the file position of the file with
descriptor {fd}. The parameter {whence} specifies how the position {pos}
should be interpreted: SEEK_SET (default) - specifies that {pos} is specified
from the beginning of the file.
*dio_stat()* >
array dio_stat(resource fd)
Function |dio_stat| returns information about the file with file descriptor
{fd}. |dio_stat| returns an associative array with the following keys:
"device" - device
*dio_tcsetattr()* >
void dio_tcsetattr(resource fd, array options)
The function |dio_tcsetattr| sets the terminal attributes and baud rate of the
open {resource}. The currently available options are 'baud' - baud rate of the
port - can be 38400,19200,9600,4800,2400,1800, 1200,600,300,200,150,134,110,75
or 50, default value is 9600.
*dio_truncate()* >
bool dio_truncate(resource fd, int offset)
Function |dio_truncate| causes the file referenced by {fd} to be truncated to
at most {offset} bytes in size. If the file previously was larger than this
size, the extra data is lost. If the file previously was shorter, it is
unspecified whether the file is left unchanged or is extended. In the latter
case the extended part reads as zero bytes. Returns TRUE on success or FALSE
on failure.;.
*dio_write()* >
int dio_write(resource fd, string data [, int len])
The function |dio_write| writes up to {len} bytes from {data} to file {fd}. If
{len} is not specified, |dio_write| writes all {data} to the specified file.
|dio_write| returns the number of bytes written to {fd}.
==============================================================================
Dir *php-dir*
*chdir()* >
bool chdir(string directory)
Changes PHP's current directory to {directory}. Returns TRUE on success or
FALSE on failure.;
*chroot()* >
bool chroot(string directory)
Changes the root directory of the current process to {directory}. Returns TRUE
on success or FALSE on failure.;
*read()* >
string read()
A pseudo-object oriented mechanism for reading a directory. The given
{directory} is opened. Two properties are available once the directory has
been opened. The handle property can be used with other directory functions
such as |readdir|, |rewinddir| and |closedir|. The path property is set to
path the directory that was opened. Three methods are available: read, rewind
and close.
*closedir()* >
void closedir(resource dir_handle)
Closes the directory stream indicated by {dir_handle}. The stream must have
previously been opened by |opendir|.
*getcwd()* >
string getcwd()
Returns the current working directory, or FALSE on failure.
*opendir()* >
resource opendir(string path)
Returns a directory handle to be used in subsequent |closedir|, |readdir|, and
|rewinddir| calls.
*readdir()* >
string readdir(resource dir_handle)
Returns the filename of the next file from the directory. The filenames are
returned in the order in which they are stored by the filesystem.
*rewinddir()* >
void rewinddir(resource dir_handle)
Resets the directory stream indicated by {dir_handle} to the beginning of the
directory.
*scandir()* >
array scandir(string directory [, int sorting_order [, resource context]])
Returns an array of files and directories from the {directory}. If {directory}
is not a directory, then boolean FALSE is returned, and an error of level
E_WARNING is generated.
==============================================================================
Dom *php-dom*
*dom_import_simplexml()* >
DOMElement dom_import_simplexml(SimpleXMLElement node)
This function takes the node {node} of class SimpleXML and makes it into a
DOMElement node. This new object can then be used as a native DOMElement
node. If any errors occur, it returns FALSE.
==============================================================================
Domxml *php-domxml*
*domxml_new_doc()* >
object domxml_new_doc(string version)
Creates a new dom document from scratch and returns it.
*domxml_open_file()* >
object domxml_open_file(string filename [, int mode])
The function parses the XML document in the file named {filename} and returns
an object of class "Dom document", having the properties as listed above. The
file is accessed read-only.
*domxml_open_mem()* >
object domxml_open_mem(string str [, int mode])
The function parses the XML document in {str} and returns an object of class
"Dom document", having the properties as listed above. This function,
|domxml_open_file| or |domxml_new_doc| must be called before any other
function calls.
*domxml_version()* >
string domxml_version()
This function returns the version of the version of the XML library currently
used.
*domxml_xmltree()* >
object domxml_xmltree(string str)
The function parses the XML document in {str} and returns a tree PHP objects
as the parsed document. This function is isolated from the other functions,
which means you cannot access the tree with any of the other functions.
Modifying it, for example by adding nodes, makes no sense since there is
currently no way to dump it as an XML file. However this function may be
valuable if you want to read a file and investigate the content.
*domxml_xslt_stylesheet_doc()* >
object domxml_xslt_stylesheet_doc()
*domxml_xslt_stylesheet_file()* >
object domxml_xslt_stylesheet_file()
*domxml_xslt_stylesheet()* >
object domxml_xslt_stylesheet()
*xpath_eval_expression()* >
object xpath_eval_expression(object xpath_context, string expression)
|xpath_eval_expression| Example ]]> &example.outputs; int(1) ["nodeset"]=>
array(1) { [0]=> object(domattribute)(5) { ["type"]=> int(2) ["name"]=>
string(8) "language" ["value"]=> string(2) "en" [0]=> int(7) [1]=>
int(138004256) } } } ]]>
*xpath_eval()* >
array xpath_eval( [object contextnode])
The optional {contextnode} can be specified for doing relative XPath queries.
*xpath_new_context()* >
object xpath_new_context()
*xptr_eval()* >
int xptr_eval( [object xpath_context, string eval_str])
*xptr_new_context()* >
string xptr_new_context( [object doc_handle])
==============================================================================
Dotnet *php-dotnet*
*dotnet_load()* >
int dotnet_load(string assembly_name [, string datatype_name [, int codepage]])
==============================================================================
Errorfunc *php-errorfunc*
*debug_backtrace()* >
array debug_backtrace()
|debug_backtrace| generates a PHP backtrace and returns this information as an
associative array. The possible returned elements are listed in the following
table:
*debug_print_backtrace()* >
void debug_print_backtrace()
|debug_print_backtrace| prints a PHP backtrace. It prints the function calls,
included/required files and |eval|ed stuff.
*error_log()* >
int error_log(string message [, int message_type [, string destination [, string extra_headers]]])
Sends an error message to the web server's error log, a TCP port or to a file.
The first parameter, {message}, is the error message that should be logged.
The second parameter, {message_type} says where the message should go:
|error_log| log types 0 {message} is sent to PHP's system logger, using the
Operating System's system logging mechanism or a file, depending on what the
error_log configuration directive is set to. This is the default option. 1
{message} is sent by email to the address in the {destination} parameter.
This is the only message type where the fourth parameter, {extra_headers} is
used. This message type uses the same internal function as |mail| does. 2
{message} is sent through the PHP debugging connection. This option is only
available if remote debugging has been enabled. In this case, the
{destination} parameter specifies the host name or IP address and optionally,
port number, of the socket receiving the debug information. 3 {message} is
appended to the file {destination}.
*error_reporting()* >
int error_reporting( [int level])
The |error_reporting| function sets the error_reporting directive at runtime.
PHP has many levels of errors, using this function sets that level for the
duration (runtime) of your script.
*restore_error_handler()* >
void restore_error_handler()
Used after changing the error handler function using |set_error_handler|, to
revert to the previous error handler (which could be the built-in or a user
defined function)
*restore_exception_handler()* >
void restore_exception_handler()
Used after changing the exception handler function using
|set_exception_handler|, to revert to the previous exception handler (which
could be the built-in or a user defined function)
*set_error_handler()* >
mixed set_error_handler(callback error_handler [, int error_types])
Sets a user function ({error_handler}) to handle errors in a script. Returns a
string containing the previously defined error handler (if any), or FALSE on
error. If the previous handler was a class method, this function will return
an indexed array with the class and the method name.
*set_exception_handler()* >
string set_exception_handler(callback exception_handler)
Sets the default exception handler if an exception is not caught within a
try/catch block. Execution will stop after the {exception_handler} is called.
*trigger_error()* >
bool trigger_error(string error_msg [, int error_type])
Used to trigger a user error condition, it can be used by in conjunction with
the built-in error handler, or with a user defined function that has been set
as the new error handler (|set_error_handler|). It only works with the E_USER
family of constants, and will default to E_USER_NOTICE.
*user_error()* >
void user_error()
This function is an alias of |trigger_error|.
==============================================================================
Exec *php-exec*
*escapeshellarg()* >
string escapeshellarg(string arg)
|escapeshellarg| adds single quotes around a string and quotes/escapes any
existing single quotes allowing you to pass a string directly to a shell
function and having it be treated as a single safe argument. This function
should be used to escape individual arguments to shell functions coming from
user input. The shell functions include |exec|, |system| and the backtick
operator. A standard use would be:
*escapeshellcmd()* >
string escapeshellcmd(string command)
|escapeshellcmd| escapes any characters in a string that might be used to
trick a shell command into executing arbitrary commands. This function should
be used to make sure that any data coming from user input is escaped before
this data is passed to the |exec| or |system| functions, or to the backtick
operator. A standard use would be:
*exec()* >
string exec(string command)
|exec| executes the given {command}, however it does not output anything. It
simply returns the last line from the result of the command. If you need to
execute a command and have all the data from the command passed directly back
without any interference, use the |passthru| function.
*passthru()* >
void passthru(string command)
The |passthru| function is similar to the |exec| function in that it executes
a {command}. If the {return_var} argument is present, the return status of
the Unix command will be placed here. This function should be used in place
of |exec| or |system| when the output from the Unix command is binary data
which needs to be passed directly back to the browser. A common use for this
is to execute something like the pbmplus utilities that can output an image
stream directly. By setting the Content-type to image/gif and then calling a
pbmplus program to output a gif, you can create PHP scripts that output
images directly.
*proc_close()* >
int proc_close(resource process)
|proc_close| is similar to |pclose| except that it only works on processes
opened by |proc_open|. |proc_close| waits for the process to terminate, and
returns its exit code. If you have open pipes to that process, you should
|fclose| them prior to calling this function in order to avoid a deadlock -
the child process may not be able to exit while the pipes are open.
*proc_get_status()* >
array proc_get_status(resource process)
|proc_get_status| fetches data about a process opened using |proc_open|. The
collected information is returned in an array containing the following
elements:
*proc_nice()* >
bool proc_nice(int increment)
|proc_nice| changes the priority of the current process by the amount
specified in {increment}. A positive {increment} will lower the priority of
the current process, whereas a negative {increment} will raise the priority.
If an error occurs, like the user lacks permission to change the priority, an
error of level E_WARNING is generated and FALSE is returned. Otherwise, TRUE
is returned.
*proc_open()* >
resource proc_open(string cmd, array descriptorspec [, string cwd [, array env [, array other_options]]])
|proc_open| is similar to |popen| but provides a much greater degree of
control over the program execution. {cmd} is the command to be executed by
the shell. {descriptorspec} is an indexed array where the key represents the
descriptor number and the value represents how PHP will pass that descriptor
to the child process. {pipes} will be set to an indexed array of file
pointers that correspond to PHP's end of any pipes that are created. The
return value is a resource representing the process; you should free it using
|proc_close| when you are finished with it.
*proc_terminate()* >
int proc_terminate(resource process [, int signal])
Signals a {process} (created using |proc_open|) that it should terminate.
|proc_terminate| returns immediately and does not wait for the process to
terminate.
*shell_exec()* >
string shell_exec(string cmd)
This function is identical to the backtick operator.
*system()* >
string system(string command)
|system| is just like the C version of the function in that it executes the
given {command} and outputs the result. If a variable is provided as the
second argument, then the return status code of the executed command will be
written to this variable.
==============================================================================
Exif *php-exif*
*exif_imagetype()* >
int exif_imagetype(string filename)
|exif_imagetype| reads the first bytes of an image and checks its signature.
*exif_read_data()* >
array exif_read_data(string filename [, string sections [, bool arrays [, bool thumbnail]]])
|exif_read_data| reads the EXIF headers from a JPEG or TIFF image file. This
way you can read meta data generated by digital cameras.
*exif_tagname()* >
string exif_tagname(string index)
{index} The image index
*exif_thumbnail()* >
string exif_thumbnail(string filename)
|exif_thumbnail| reads the embedded thumbnail of a TIFF or JPEG image.
*read_exif_data()* >
void read_exif_data()
This function is an alias of |exif_read_data|.
==============================================================================
Fam *php-fam*
*fam_cancel_monitor()* >
bool fam_cancel_monitor(resource fam, resource fam_monitor)
|fam_cancel_monitor| terminates monitoring on a resource previously requested
using one of the fam_monitor_ functions. In addition an FAMAcknowledge event
occurs.
*fam_close()* >
void fam_close(resource fam)
|fam_close| closes a connection to the FAM service previously opened using
|fam_open|.
*fam_monitor_collection()* >
resource fam_monitor_collection(resource fam, string dirname, int depth, string mask)
|fam_monitor_collection| requests monitoring for a collection of files within
a directory. The actual files to be monitored are specified by a directory
path in {dirname}, the maximum search {depth} starting from this directory
and a shell pattern {mask} restricting the file names to look for.
*fam_monitor_directory()* >
resource fam_monitor_directory(resource fam, string dirname)
|fam_monitor_directory| requests monitoring for a directory and all contained
files. A FAM event will be generated whenever the status of the directory
(i.e. the result of function |stat| on that directory) or its content (i.e.
the results of |readdir|) change.
*fam_monitor_file()* >
resource fam_monitor_file(resource fam, string filename)
|fam_monitor_file| requests monitoring for a single file. A FAM event will be
generated whenever the file status (i.e. the result of function |stat| on
that file) changes.
*fam_next_event()* >
array fam_next_event(resource fam)
|fam_next_event| returns the next pending FAM event. The function will block
until an event is available which can be checked for using |fam_pending|.
*fam_open()* >
resource fam_open()
|fam_open| opens a connection to the FAM service daemon. The optional
parameter {appname} should be set to a string identifying the application for
logging reasons.
*fam_pending()* >
bool fam_pending(resource fam)
|fam_pending| returns TRUE if events are available to be fetched using
|fam_next_event|.
*fam_resume_monitor()* >
bool fam_resume_monitor(resource fam, resource fam_monitor)
|fam_resume_monitor| resumes monitoring of a resource previously suspend using
|fam_suspend_monitor|.
*fam_suspend_monitor()* >
bool fam_suspend_monitor(resource fam, resource fam_monitor)
|fam_suspend_monitor| temporarily suspend monitoring of a resource previously
requested using one of the fam_monitor_ functions. Monitoring can later be
continued using |fam_resume_monitor| without the need of requesting a
complete new monitor.
==============================================================================
Fbsql *php-fbsql*
*fbsql_affected_rows()* >
int fbsql_affected_rows( [resource link_identifier])
|fbsql_affected_rows| returns the number of rows affected by the last INSERT,
UPDATE or DELETE query associated with {link_identifier}. If the link
identifier isn't specified, the last link opened by |fbsql_connect| is
assumed.
*fbsql_autocommit()* >
bool fbsql_autocommit(resource link_identifier [, bool OnOff])
|fbsql_autocommit| returns the current autocommit status. If the optional
OnOff parameter is given the auto commit status will be changed. With OnOff
set to TRUE each statement will be committed automatically, if no errors was
found. With OnOff set to FALSE the user must commit or rollback the
transaction using either |fbsql_commit| or |fbsql_rollback|.
*fbsql_blob_size()* >
int fbsql_blob_size(string blob_handle [, resource link_identifier])
*fbsql_change_user()* >
resource fbsql_change_user(string user, string password [, string database [, resource link_identifier]])
|fbsql_change_user| changes the logged in user of the current active
connection, or the connection given by the optional parameter
link_identifier. If a database is specified, this will default or current
database after the user has been changed. If the new user and password
authorization fails, the current connected user stays active.
*fbsql_clob_size()* >
int fbsql_clob_size(string clob_handle [, resource link_identifier])
*fbsql_close()* >
bool fbsql_close( [resource link_identifier])
Returns: TRUE on success, FALSE on error.
*fbsql_commit()* >
bool fbsql_commit( [resource link_identifier])
Returns TRUE on success or FALSE on failure.;
*fbsql_connect()* >
resource fbsql_connect( [string hostname [, string username [, string password]]])
Returns a positive FrontBase link identifier on success, or an error message
on failure.
*fbsql_create_blob()* >
string fbsql_create_blob(string blob_data [, resource link_identifier])
Returns: A resource handle to the newly created blob.
*fbsql_create_clob()* >
string fbsql_create_clob(string clob_data [, resource link_identifier])
Returns: A resource handle to the newly created CLOB.
*fbsql_create_db()* >
bool fbsql_create_db(string database_name [, resource link_identifier [, string database_options]])
|fbsql_create_db| attempts to create a new database named {database_name} on
the server associated with the specified connection {link_identifier}.
*fbsql_data_seek()* >
bool fbsql_data_seek(resource result_identifier, int row_number)
Returns TRUE on success or FALSE on failure.;
*fbsql_database_password()* >
string fbsql_database_password(resource link_identifier [, string database_password])
Returns: The database password associated with the link identifier.
*fbsql_database()* >
string fbsql_database(resource link_identifier [, string database])
*fbsql_db_query()* >
resource fbsql_db_query(string database, string query [, resource link_identifier])
Returns: A positive FrontBase result identifier to the query result, or FALSE
on error.
*fbsql_db_status()* >
int fbsql_db_status(string database_name [, resource link_identifier])
Returns: An integer value with the current status.
*fbsql_drop_db()* >
bool fbsql_drop_db(string database_name [, resource link_identifier])
Returns TRUE on success or FALSE on failure.;
*fbsql_errno()* >
int fbsql_errno( [resource link_identifier])
Returns the error number from the last fbsql function, or 0 (zero) if no error
occurred.
*fbsql_error()* >
string fbsql_error( [resource link_identifier])
Returns the error text from the last fbsql function, or '' (the empty string)
if no error occurred.
*fbsql_fetch_array()* >
array fbsql_fetch_array(resource result [, int result_type])
Returns an array that corresponds to the fetched row, or FALSE if there are no
more rows.
*fbsql_fetch_assoc()* >
array fbsql_fetch_assoc(resource result)
Returns an associative array that corresponds to the fetched row, or FALSE if
there are no more rows.
*fbsql_fetch_field()* >
object fbsql_fetch_field(resource result [, int field_offset])
Returns an object containing field information.
*fbsql_fetch_lengths()* >
array fbsql_fetch_lengths(resource result)
Returns: An array that corresponds to the lengths of each field in the last
row fetched by |fbsql_fetch_row|, or FALSE on error.
*fbsql_fetch_object()* >
object fbsql_fetch_object(resource result [, int result_type])
Returns an object with properties that correspond to the fetched row, or FALSE
if there are no more rows.
*fbsql_fetch_row()* >
array fbsql_fetch_row(resource result)
Returns: An array that corresponds to the fetched row, or FALSE if there are
no more rows.
*fbsql_field_flags()* >
string fbsql_field_flags(resource result [, int field_offset])
|fbsql_field_flags| returns the field flags of the specified field. The flags
are reported as a single word per flag separated by a single space, so that
you can split the returned value using |explode|.
*fbsql_field_len()* >
int fbsql_field_len(resource result [, int field_offset])
|fbsql_field_len| returns the length of the specified field.
*fbsql_field_name()* >
string fbsql_field_name(resource result [, int field_index])
|fbsql_field_name| returns the name of the specified field index. {result}
must be a valid result identifier and {field_index} is the numerical offset
of the field.
*fbsql_field_seek()* >
bool fbsql_field_seek(resource result [, int field_offset])
Seeks to the specified field offset. If the next call to |fbsql_fetch_field|
doesn't include a field offset, the field offset specified in
|fbsql_field_seek| will be returned.
*fbsql_field_table()* >
string fbsql_field_table(resource result [, int field_offset])
Returns the name of the table that the specified field is in.
*fbsql_field_type()* >
string fbsql_field_type(resource result [, int field_offset])
|fbsql_field_type| is similar to the |fbsql_field_name| function. The
arguments are identical, but the field type is returned instead. The field
type will be one of "int", "real", "string", "blob", and others as detailed
in the FrontBase documentation. |fbsql_field_type| example "; echo "The table
has the following fields "; while ($i < $fields) { $type =
fbsql_field_type($result, $i); $name = fbsql_field_name($result, $i); $len =
fbsql_field_len($result, $i); $flags = fbsql_field_flags($result, $i); echo
$type . " " . $name . " " . $len . " " . $flags . ""; $i++; } fbsql_close();
?> ]]>
*fbsql_free_result()* >
bool fbsql_free_result(resource result)
|fbsql_free_result| will free all memory associated with the result identifier
{result}.
*fbsql_get_autostart_info()* >
array fbsql_get_autostart_info( [resource link_identifier])
*fbsql_hostname()* >
string fbsql_hostname(resource link_identifier [, string host_name])
*fbsql_insert_id()* >
int fbsql_insert_id( [resource link_identifier])
|fbsql_insert_id| returns the ID generated for an column defined as DEFAULT
UNIQUE by the previous INSERT query using the given {link_identifier}. If
{link_identifier} isn't specified, the last opened link is assumed.
*fbsql_list_dbs()* >
resource fbsql_list_dbs( [resource link_identifier])
|fbsql_list_dbs| will return a result pointer containing the databases
available from the current fbsql daemon. Use the |fbsql_tablename| function
to traverse this result pointer.
*fbsql_list_fields()* >
resource fbsql_list_fields(string database_name, string table_name [, resource link_identifier])
|fbsql_list_fields| retrieves information about the given tablename. Arguments
are the database name and the table name. A result pointer is returned which
can be used with |fbsql_field_flags|, |fbsql_field_len|, |fbsql_field_name|,
and |fbsql_field_type|.
*fbsql_list_tables()* >
resource fbsql_list_tables(string database [, resource link_identifier])
|fbsql_list_tables| takes a database name and returns a result pointer much
like the |fbsql_db_query| function. The |fbsql_tablename| function should be
used to extract the actual table names from the result pointer.
*fbsql_next_result()* >
bool fbsql_next_result(resource result_id)
When sending more than one SQL statement to the server or executing a stored
procedure with multiple results will cause the server to return multiple
result sets. This function will test for additional results available form
the server. If an additional result set exists it will free the existing
result set and prepare to fetch the words from the new result set. The
function will return TRUE if an additional result set was available or FALSE
otherwise.
*fbsql_num_fields()* >
int fbsql_num_fields(resource result)
|fbsql_num_fields| returns the number of fields in a result set.
*fbsql_num_rows()* >
int fbsql_num_rows(resource result)
|fbsql_num_rows| returns the number of rows in a result set. This command is
only valid for SELECT statements. To retrieve the number of rows returned
from a INSERT, UPDATE or DELETE query, use |fbsql_affected_rows|.
|fbsql_num_rows| example ]]>
*fbsql_password()* >
string fbsql_password(resource link_identifier [, string password])
*fbsql_pconnect()* >
resource fbsql_pconnect( [string hostname [, string username [, string password]]])
Returns: A positive FrontBase persistent link identifier on success, or FALSE
on error.
*fbsql_query()* >
resource fbsql_query(string query [, resource link_identifier [, int batch_size]])
|fbsql_query| sends a query to the currently active database on the server
that's associated with the specified link identifier. If {link_identifier}
isn't specified, the last opened link is assumed. If no link is open, the
function tries to establish a link as if |fbsql_connect| was called with no
arguments, and use it.
*fbsql_read_blob()* >
string fbsql_read_blob(string blob_handle [, resource link_identifier])
Returns: A string containing the BLOB specified by blob_handle.
*fbsql_read_clob()* >
string fbsql_read_clob(string clob_handle [, resource link_identifier])
Returns: A string containing the CLOB specified by clob_handle.
*fbsql_result()* >
mixed fbsql_result(resource result [, int row [, mixed field]])
|fbsql_result| returns the contents of one cell from a FrontBase result set.
The field argument can be the field's offset, or the field's name, or the
field's table dot field's name (tabledname.fieldname). If the column name has
been aliased ('select foo as bar from...'), use the alias instead of the
column name.
*fbsql_rollback()* >
bool fbsql_rollback( [resource link_identifier])
Returns TRUE on success or FALSE on failure.;
*fbsql_select_db()* >
bool fbsql_select_db( [string database_name [, resource link_identifier]])
|fbsql_select_db| sets the current active database on the server that's
associated with the specified link identifier. If no link identifier is
specified, the last opened link is assumed. If no link is open, the function
will try to establish a link as if |fbsql_connect| was called, and use it.
*fbsql_set_lob_mode()* >
bool fbsql_set_lob_mode(resource result, string database_name)
Returns: TRUE on success, FALSE on error.
*fbsql_set_password()* >
bool fbsql_set_password(resource link_identifier, string user, string password, string old_password)
*fbsql_set_transaction()* >
void fbsql_set_transaction(resource link_identifier, int Locking, int Isolation)
*fbsql_start_db()* >
bool fbsql_start_db(string database_name [, resource link_identifier [, string database_options]])
Returns TRUE on success or FALSE on failure.;
*fbsql_stop_db()* >
bool fbsql_stop_db(string database_name [, resource link_identifier])
Returns TRUE on success or FALSE on failure.;
*fbsql_tablename()* >
string fbsql_tablename(resource result, int i)
|fbsql_tablename| takes a result pointer returned by the |fbsql_list_tables|
function as well as an integer index and returns the name of a table. The
|fbsql_num_rows| function may be used to determine the number of tables in
the result pointer. |fbsql_tablename| example "; $i++; } ?> ]]>
*fbsql_username()* >
string fbsql_username(resource link_identifier [, string username])
*fbsql_warnings()* >
bool fbsql_warnings( [bool OnOff])
Returns TRUE if warnings is turned on otherwise FALSE.
==============================================================================
Fdf *php-fdf*
*fdf_add_doc_javascript()* >
bool fdf_add_doc_javascript(resource fdfdoc, string script_name, string script_code)
Adds a script to the FDF, which Acrobat then adds to the doc-level scripts of
a document, once the FDF is imported into it. It is strongly suggested to use
'\r' for linebreaks within {script_code}.
*fdf_add_template()* >
bool fdf_add_template(resource fdfdoc, int newpage, string filename, string template, int rename)
*fdf_close()* >
bool fdf_close(resource fdf_document)
The |fdf_close| function closes the FDF document.
*fdf_create()* >
resource fdf_create()
The |fdf_create| creates a new FDF document. This function is needed if one
would like to populate input fields in a PDF document with data.
*fdf_enum_values()* >
bool fdf_enum_values(resource fdfdoc, callback function)
*fdf_errno()* >
int fdf_errno()
|fdf_errno| returns the error code set by the last FDF function call. This is
zero for a successfull operation or a non-zero error code on failure. A
textual description may be obtained using the |fdf_error| function.
*fdf_error()* >
string fdf_error()
|fdf_error| returns a textual description for the fdf error code given in
{error_code}. The function uses the internal error code set by the last
operation if no {error_code} is given, so fdf_error() is a convenient
shortcut for fdf_error(fdf_errno()).
*fdf_get_ap()* >
bool fdf_get_ap(resource fdf_document, string field, int face, string filename)
The |fdf_get_ap| function gets the appearance of a {field} (i.e. the value of
the /AP key) and stores it in a file. The possible values of {face} are
FDFNormalAP, FDFRolloverAP and FDFDownAP. The appearance is stored in
{filename}.
*fdf_get_attachment()* >
array fdf_get_attachment(resource fdf_document, string fieldname, string savepath)
Extracts a file uploaded by means of the "file selection" field {fieldname}
and stores it under {savepath}. {savepath} may be the name of a plain file or
an existing directory in which the file is to be created under its original
name. Any existing file under the same name will be overwritten.
*fdf_get_encoding()* >
string fdf_get_encoding(resource fdf_document)
The |fdf_get_encoding| returns the value of the /Encoding key. An empty string
is returned if the default PDFDocEncoding/Unicode scheme is used.
*fdf_get_file()* >
string fdf_get_file(resource fdf_document)
The |fdf_set_file| returns the value of the /F key.
*fdf_get_flags()* >
int fdf_get_flags(resource fdfdoc, string fieldname, int whichflags)
*fdf_get_opt()* >
mixed fdf_get_opt(resource fdfdof, string fieldname)
*fdf_get_status()* >
string fdf_get_status(resource fdf_document)
The |fdf_get_status| returns the value of the /STATUS key.
*fdf_get_value()* >
string fdf_get_value(resource fdf_document, string fieldname)
The |fdf_get_value| function returns the value for the requested {fieldname}.
*fdf_get_version()* >
string fdf_get_version()
This function will return the fdf version for the given {fdf_document}, or the
toolkit API version number if no parameter is given.
*fdf_header()* >
bool fdf_header()
This is a convenience function to set appropriate HTTP headers for FDF output.
It sets the Content-type: to application/vnd.fdf.
*fdf_next_field_name()* >
string fdf_next_field_name(resource fdf_document [, string fieldname])
The |fdf_next_field_name| function returns the name of the field after the
field in {fieldname} or the field name of the first field if the second
parameter is NULL.
*fdf_open_string()* >
resource fdf_open_string(string fdf_data)
The |fdf_open_string| function reads form data from a string. {fdf_data} must
contain the data as returned from a PDF form or created using |fdf_create|
and |fdf_save_string|.
*fdf_open()* >
resource fdf_open(string filename)
The |fdf_open| function opens a file with form data. This file must contain
the data as returned from a PDF form or created using |fdf_create| and
|fdf_save|.
*fdf_remove_item()* >
bool fdf_remove_item(resource fdfdoc, string fieldname, int item)
*fdf_save_string()* >
string fdf_save_string(resource fdf_document)
The |fdf_save_string| function returns the FDF document as a string.
*fdf_save()* >
bool fdf_save(resource fdf_document)
The |fdf_save| function saves a FDF document. The resulting FDF will be
written to {filename}. Without a {filename} |fdf_save| will write the FDF to
the default PHP output stream.
*fdf_set_ap()* >
bool fdf_set_ap(resource fdf_document, string field_name, int face, string filename, int page_number)
The |fdf_set_ap| function sets the appearance of a field (i.e. the value of
the /AP key). The possible values of {face} are FDFNormalAP, FDFRolloverAP
and FDFDownAP.
*fdf_set_encoding()* >
bool fdf_set_encoding(resource fdf_document, string encoding)
|fdf_set_encoding| sets the character encoding in FDF document {fdf_document}.
{encoding} should be the valid encoding name. Currently the following values
are supported: "Shift-JIS", "UHC", "GBK","BigFive". An empty string resets
the encoding to the default PDFDocEncoding/Unicode scheme.
*fdf_set_file()* >
bool fdf_set_file(resource fdf_document, string url)
The |fdf_set_file| selects a different PDF document to display the form
results in then the form it originated from. The {url} needs to be given as
an absolute URL.
*fdf_set_flags()* >
bool fdf_set_flags(resource fdf_document, string fieldname, int whichFlags, int newFlags)
The |fdf_set_flags| sets certain flags of the given field {fieldname}.
*fdf_set_javascript_action()* >
bool fdf_set_javascript_action(resource fdf_document, string fieldname, int trigger, string script)
|fdf_set_javascript_action| sets a javascript action for the given field
{fieldname}.
*fdf_set_on_import_javascript()* >
bool fdf_set_on_import_javascript(resource fdfdoc, string script)
See also |fdf_add_doc_javascript|&listendand; |fdf_set_javascript_action|.
*fdf_set_opt()* >
bool fdf_set_opt(resource fdf_document, string fieldname, int element, string str1, string str2)
The |fdf_set_opt| sets options of the given field {fieldname}.
*fdf_set_status()* >
bool fdf_set_status(resource fdf_document, string status)
The |fdf_set_status| sets the value of the /STATUS key. When a client receives
a FDF with a status set it will present the value in an alert box.
*fdf_set_submit_form_action()* >
bool fdf_set_submit_form_action(resource fdf_document, string fieldname, int trigger, string script, int flags)
The |fdf_set_submit_form_action| sets a submit form action for the given field
{fieldname}.
*fdf_set_target_frame()* >
bool fdf_set_target_frame(resource fdf_document, string frame_name)
Sets the target frame to display a result PDF defined with |fdf_save_file| in.
*fdf_set_value()* >
bool fdf_set_value(resource fdf_document, string fieldname, mixed value)
The |fdf_set_value| function sets the {value} for a field named {fieldname}.
The {value} will be stored as a string unless it is an array. In this case
all array elements will be stored as a value array.
*fdf_set_version()* >
string fdf_set_version(resource fdf_document, string version)
This function will set the fdf {version} for the given {fdf_document}. Some
features supported by this extension are only available in newer fdf
versions. For the current FDF toolkit 5.0 {version} may be either '1.2',
'1.3' or '1.4'.
==============================================================================
Filepro *php-filepro*
*filepro_fieldcount()* >
int filepro_fieldcount()
Returns the number of fields (columns) in the opened filePro database.
*filepro_fieldname()* >
string filepro_fieldname(int field_number)
Returns the name of the field corresponding to {field_number}.
*filepro_fieldtype()* >
string filepro_fieldtype(int field_number)
Returns the edit type of the field corresponding to {field_number}.
*filepro_fieldwidth()* >
int filepro_fieldwidth(int field_number)
Returns the width of the field corresponding to {field_number}.
*filepro_retrieve()* >
string filepro_retrieve(int row_number, int field_number)
Returns the data from the specified location in the database. The {row_number}
parameter must be between zero and the total number of rows minus one
(0..|filepro_rowcount| - 1). Likewise, {field_number} accepts values between
zero and the total number of fields minus one (0..|filepro_fieldcount| - 1)
*filepro_rowcount()* >
int filepro_rowcount()
Returns the number of rows in the opened filePro database.
*filepro()* >
bool filepro(string directory)
This reads and verifies the map file, storing the field count and info.
==============================================================================
Filesystem *php-filesystem*
*basename()* >
string basename(string path [, string suffix])
Given a string containing a path to a file, this function will return the base
name of the file. If the filename ends in {suffix} this will also be cut off.
*chgrp()* >
bool chgrp(string filename, mixed group)
Attempts to change the group of the file {filename} to {group} (specified by
name or number). Only the superuser may change the group of a file
arbitrarily; other users may change the group of a file to any group of which
that user is a member.
*chmod()* >
bool chmod(string filename, int mode)
Attempts to change the mode of the file specified by {filename} to that given
in {mode}.
*chown()* >
bool chown(string filename, mixed user)
Attempts to change the owner of the file {filename} to user {user} (specified
by name or number). Only the superuser may change the owner of a file.
*clearstatcache()* >
void clearstatcache()
When you use |stat|, |lstat|, or any of the other functions listed in the
affected functions list (below), PHP caches the information those functions
return in order to provide faster performance. However, in certain cases, you
may want to clear the cached information. For instance, if the same file is
being checked multiple times within a single script, and that file is in
danger of being removed or changed during that script's operation, you may
elect to clear the status cache. In these cases, you can use the
|clearstatcache| function to clear the information that PHP caches about a
file.
*copy()* >
bool copy(string source, string dest)
Makes a copy of the file {source} to {dest}. Returns TRUE on success or FALSE
on failure.; |copy| example ]]>
*delete()* >
void delete(string file)
This is a dummy manual entry to satisfy those people who are looking for
|unlink| or |unset| in the wrong place.
*dirname()* >
string dirname(string path)
Given a string containing a path to a file, this function will return the name
of the directory.
*disk_free_space()* >
float disk_free_space(string directory)
Given a string containing a directory, this function will return the number of
bytes available on the corresponding filesystem or disk partition.
*disk_total_space()* >
float disk_total_space(string directory)
Given a string containing a directory, this function will return the total
number of bytes on the corresponding filesystem or disk partition.
*diskfreespace()* >
void diskfreespace()
This function is an alias of |disk_free_space|.
*fclose()* >
bool fclose(resource handle)
The file pointed to by {handle} is closed.
*feof()* >
bool feof(resource handle)
Returns TRUE if the file pointer is at EOF or an error occurs (including
socket timeout); otherwise returns FALSE.
*fflush()* >
bool fflush(resource handle)
This function forces a write of all buffered output to the resource pointed to
by the file handle {handle}. Returns TRUE on success or FALSE on failure.;
*fgetc()* >
string fgetc(resource handle)
Returns a string containing a single character read from the file pointed to
by {handle}. Returns FALSE on EOF.
*fgetcsv()* >
array fgetcsv(resource handle [, int length [, string delimiter [, string enclosure]]])
{handle} A valid file pointer to a file successfully opened by |fopen|,
|popen|, or |fsockopen|. {length} (Optional) Must be greater than the longest
line (in characters) to be found in the CSV file (allowing for trailing
line-end characters). It became optional in PHP 5. {delimiter} (Optional) Set
the field delimiter (one character only). Defaults as a comma. {enclosure}
(Optional) Set the field enclosure character (one character only). Defaults
as a double quotation mark. Added in PHP 4.3.0.
*fgets()* >
string fgets(resource handle [, int length])
Returns a string of up to {length} - 1 bytes read from the file pointed to by
{handle}. Reading ends when {length} - 1 bytes have been read, on a newline
(which is included in the return value), or on EOF (whichever comes first).
If no length is specified, the length defaults to 1k, or 1024 bytes.
*fgetss()* >
string fgetss(resource handle [, int length [, string allowable_tags]])
Identical to |fgets|, except that fgetss attempts to strip any HTML and PHP
tags from the text it reads.
*file_exists()* >
bool file_exists(string filename)
Returns TRUE if the file or directory specified by {filename} exists; FALSE
otherwise.
*file_get_contents()* >
string file_get_contents(string filename [, bool use_include_path [, resource context [, int offset]]])
Identical to |file|, except that |file_get_contents| returns the file in a
string, starting at the specified {offset}. On failure, |file_get_contents|
will return FALSE.
*file_put_contents()* >
int file_put_contents(string filename, mixed data [, int flags [, resource context]])
Identical to calling |fopen|, |fwrite|, and |fclose| successively. The
function returns the amount of bytes that were written to the file.
*file()* >
array file(string filename [, int use_include_path [, resource context]])
Identical to |readfile|, except that |file| returns the file in an array. Each
element of the array corresponds to a line in the file, with the newline still
attached. Upon failure, |file| returns FALSE.
*fileatime()* >
int fileatime(string filename)
Returns the time the file was last accessed, or FALSE in case of an error. The
time is returned as a Unix timestamp.
*filectime()* >
int filectime(string filename)
Returns the time the file was last changed, or FALSE in case of an error. The
time is returned as a Unix timestamp.
*filegroup()* >
int filegroup(string filename)
Returns the group ID of the file, or FALSE in case of an error. The group ID
is returned in numerical format, use |posix_getgrgid| to resolve it to a
group name. Upon failure, FALSE is returned along with an error of level
E_WARNING.
*fileinode()* >
int fileinode(string filename)
Returns the inode number of the file, or FALSE in case of an error.
*filemtime()* >
int filemtime(string filename)
Returns the time the file was last modified, or FALSE in case of an error. The
time is returned as a Unix timestamp, which is suitable for the |date|
function.
*fileowner()* >
int fileowner(string filename)
Returns the user ID of the owner of the file, or FALSE in case of an error.
The user ID is returned in numerical format, use |posix_getpwuid| to resolve
it to a username.
*fileperms()* >
int fileperms(string filename)
Returns the permissions on the file, or FALSE in case of an error.
*filesize()* >
int filesize(string filename)
Returns the size of the file in bytes, or FALSE in case of an error.
*filetype()* >
string filetype(string filename)
Returns the type of the file. Possible values are fifo, char, dir, block,
link, file, and unknown.
*flock()* >
bool flock(resource handle, int operation)
PHP supports a portable way of locking complete files in an advisory way
(which means all accessing programs have to use the same way of locking or it
will not work).
*fnmatch()* >
bool fnmatch(string pattern, string string [, int flags])
|fnmatch| checks if the passed {string} would match the given shell wildcard
{pattern}.
*fopen()* >
resource fopen(string filename, string mode [, bool use_include_path [, resource zcontext]])
|fopen| binds a named resource, specified by {filename}, to a stream. If
{filename} is of the form "scheme://...", it is assumed to be a URL and PHP
will search for a protocol handler (also known as a wrapper) for that scheme.
If no wrappers for that protocol are registered, PHP will emit a notice to
help you track potential problems in your script and then continue as though
{filename} specifies a regular file.
*fpassthru()* >
int fpassthru(resource handle)
Reads to EOF on the given file pointer from the current position and writes
the results to the output buffer.
*fputcsv()* >
int fputcsv(resource handle [, array fields [, string delimiter [, string enclosure]]])
|fputcsv| formats a line (passed as a {fields} array) as CSV and write it to
the specified file {handle}. Returns the length of the written string, or
FALSE on failure.
*fputs()* >
void fputs()
This function is an alias of |fwrite|.
*fread()* >
string fread(resource handle, int length)
|fread| reads up to {length} bytes from the file pointer referenced by
{handle}. Reading stops when {length} bytes have been read, EOF (end of file)
is reached, or (for network streams) when a packet becomes available,
whichever comes first.
*fscanf()* >
mixed fscanf(resource handle, string format)
The function |fscanf| is similar to |sscanf|, but it takes its input from a
file associated with {handle} and interprets the input according to the
specified {format}, which is described in the documentation for |sprintf|. If
only two parameters were passed to this function, the values parsed will be
returned as an array. Otherwise, if optional parameters are passed, the
function will return the number of assigned values. The optional parameters
must be passed by reference.
*fseek()* >
int fseek(resource handle, int offset [, int whence])
Sets the file position indicator for the file referenced by {handle}. The new
position, measured in bytes from the beginning of the file, is obtained by
adding {offset} to the position specified by {whence}, whose values are
defined as follows: SEEK_SET - Set position equal to {offset} bytes. SEEK_CUR
- Set position to current location plus {offset}. SEEK_END - Set position to
end-of-file plus {offset}. (To move to a position before the end-of-file, you
need to pass a negative value in {offset}.)
*fstat()* >
array fstat(resource handle)
Gathers the statistics of the file opened by the file pointer {handle}. This
function is similar to the |stat| function except that it operates on an open
file pointer instead of a filename.
*ftell()* >
int ftell(resource handle)
Returns the position of the file pointer referenced by {handle}; i.e., its
offset into the file stream.
*ftruncate()* >
bool ftruncate(resource handle, int size)
Takes the filepointer, {handle}, and truncates the file to length, {size}.
Returns TRUE on success or FALSE on failure.;
*fwrite()* >
int fwrite(resource handle, string string [, int length])
|fwrite| writes the contents of {string} to the file stream pointed to by
{handle}. If the {length} argument is given, writing will stop after {length}
bytes have been written or the end of {string} is reached, whichever comes
first.
*glob()* >
array glob(string pattern [, int flags])
The |glob| function searches for all the pathnames matching {pattern}
according to the rules used by the libc glob() function, which is similar to
the rules used by common shells. No tilde expansion or parameter substitution
is done.
*is_dir()* >
bool is_dir(string filename)
Returns TRUE if the filename exists and is a directory. If {filename} is a
relative filename, it will be checked relative to the current working
directory.
*is_executable()* >
bool is_executable(string filename)
Returns TRUE if the filename exists and is executable.
*is_file()* >
bool is_file(string filename)
Returns TRUE if the filename exists and is a regular file.
*is_link()* >
bool is_link(string filename)
Returns TRUE if the filename exists and is a symbolic link.
*is_readable()* >
bool is_readable(string filename)
Returns TRUE if the filename exists and is readable.
*is_uploaded_file()* >
bool is_uploaded_file(string filename)
Returns TRUE if the file named by {filename} was uploaded via HTTP POST. This
is useful to help ensure that a malicious user hasn't tried to trick the
script into working on files upon which it should not be working--for
instance, /etc/passwd.
*is_writable()* >
bool is_writable(string filename)
Returns TRUE if the {filename} exists and is writable. The filename argument
may be a directory name allowing you to check if a directory is writeable.
*is_writeable()* >
void is_writeable()
This function is an alias of |is_writable|.
*link()* >
bool link(string target, string link)
|link| creates a hard link. Returns TRUE on success or FALSE on failure.;
*linkinfo()* >
int linkinfo(string path)
|linkinfo| returns the st_dev field of the Unix C stat structure returned by
the lstat system call. This function is used to verify if a link (pointed to
by {path}) really exists (using the same method as the S_ISLNK macro defined
in stat.h). Returns 0 or FALSE in case of error.
*lstat()* >
array lstat(string filename)
Gathers the statistics of the file or symbolic link named by {filename}. This
function is identical to the |stat| function except that if the {filename}
parameter is a symbolic link, the status of the symbolic link is returned,
not the status of the file pointed to by the symbolic link.
*mkdir()* >
bool mkdir(string pathname [, int mode [, bool recursive [, resource context]]])
Attempts to create the directory specified by pathname.
*move_uploaded_file()* >
bool move_uploaded_file(string filename, string destination)
This function checks to ensure that the file designated by {filename} is a
valid upload file (meaning that it was uploaded via PHP's HTTP POST upload
mechanism). If the file is valid, it will be moved to the filename given by
{destination}.
*parse_ini_file()* >
array parse_ini_file(string filename [, bool process_sections])
|parse_ini_file| loads in the ini file specified in {filename}, and returns
the settings in it in an associative array. By setting the last
{process_sections} parameter to TRUE, you get a multidimensional array, with
the section names and settings included. The default for {process_sections}
is FALSE
*pathinfo()* >
array pathinfo(string path [, int options])
|pathinfo| returns an associative array containing information about {path}.
The following array elements are returned: dirname, basename and extension.
*pclose()* >
int pclose(resource handle)
Closes a file pointer to a pipe opened by |popen|.
*popen()* >
resource popen(string command, string mode)
Opens a pipe to a process executed by forking the command given by command.
*readfile()* >
int readfile(string filename [, bool use_include_path [, resource context]])
Reads a file and writes it to the output buffer.
*readlink()* >
string readlink(string path)
|readlink| does the same as the readlink C function and returns the contents
of the symbolic link path or FALSE in case of error.
*realpath()* >
string realpath(string path)
|realpath| expands all symbolic links and resolves references to '/./', '/../'
and extra '/' characters in the input {path} and return the canonicalized
absolute pathname. The resulting path will have no symbolic link, '/./' or
'/../' components.
*rename()* >
bool rename(string oldname, string newname [, resource context])
Attempts to rename {oldname} to {newname}.
*rewind()* >
bool rewind(resource handle)
Sets the file position indicator for {handle} to the beginning of the file
stream.
*rmdir()* >
bool rmdir(string dirname [, resource context])
Attempts to remove the directory named by {dirname}. The directory must be
empty, and the relevant permissions must permit this. Returns TRUE on success
or FALSE on failure.;
*set_file_buffer()* >
void set_file_buffer()
This function is an alias of |stream_set_write_buffer|.
*stat()* >
array stat(string filename)
Gathers the statistics of the file named by {filename}. If {filename} is a
symbolic link, statistics are from the file itself, not the symlink. |lstat|
is identical to stat except it would instead be based off the symlinks
status.
*symlink()* >
bool symlink(string target, string link)
|symlink| creates a symbolic link from the existing {target} with the
specified name {link}.
*tempnam()* >
string tempnam(string dir, string prefix)
Creates a file with a unique filename in the specified directory. If the
directory does not exist, |tempnam| may generate a file in the system's
temporary directory, and return the name of that.
*tmpfile()* >
resource tmpfile()
Creates a temporary file with an unique name in read-write (w+) mode,
returning a file handle similar to the one returned by |fopen|. The file is
automatically removed when closed (using |fclose|), or when the script ends.
*touch()* >
bool touch(string filename [, int time [, int atime]])
Attempts to set the access and modification time of the file named by
{filename} to the value given by {time}. If the parameter {time} is not
given, uses the present time. This is equivalent to what utime (sometimes
referred to as utimes) does. If the third parameter {atime} is present, the
access time of the given filename is set to the value of {atime}. Note that
the access time is always modified, regardless of the number of parameters.
*umask()* >
int umask( [int mask])
|umask| sets PHP's umask to {mask} & 0777 and returns the old umask. When PHP
is being used as a server module, the umask is restored when each request is
finished.
*unlink()* >
bool unlink(string filename [, resource context])
Deletes {filename}. Similar to the Unix C unlink() function. Returns TRUE on
success or FALSE on failure.;
==============================================================================
Fribidi *php-fribidi*
*fribidi_log2vis()* >
string fribidi_log2vis(string str, string direction, int charset)
==============================================================================
Ftp *php-ftp*
*ftp_alloc()* >
bool ftp_alloc(resource ftp_stream, int filesize)
Sends an ALLO command to the remote FTP server to allocate {filesize} bytes of
space. Returns TRUE on success, or FALSE on failure.
*ftp_cdup()* >
bool ftp_cdup(resource ftp_stream)
Changes to the parent directory.
*ftp_chdir()* >
bool ftp_chdir(resource ftp_stream, string directory)
Changes the current directory to the specified {directory}.
*ftp_chmod()* >
int ftp_chmod(resource ftp_stream, int mode, string filename)
Sets the permissions on the remote file specified by {filename} to {mode}
given as an octal value.
*ftp_close()* >
bool ftp_close(resource ftp_stream)
|ftp_close| closes {ftp_stream} and releases the resource. After calling this
function, you can no longer use the FTP connection and must create a new one
with |ftp_connect|.
*ftp_connect()* >
resource ftp_connect(string host [, int port [, int timeout]])
Returns a FTP stream on success or FALSE on error.
*ftp_delete()* >
bool ftp_delete(resource ftp_stream, string path)
|ftp_delete| deletes the file specified by {path} from the FTP server.
*ftp_exec()* >
bool ftp_exec(resource ftp_stream, string command)
Sends a SITE EXEC {command} request to the FTP server. Returns TRUE if the
command was successful (server sent response code: 200); otherwise returns
FALSE.
*ftp_fget()* >
bool ftp_fget(resource ftp_stream, resource handle, string remote_file, int mode [, int resumepos])
|ftp_fget| retrieves {remote_file} from the FTP server, and writes it to the
given file pointer, {handle}. The transfer {mode} specified must be either
FTP_ASCII or FTP_BINARY.
*ftp_fput()* >
bool ftp_fput(resource ftp_stream, string remote_file, resource handle, int mode [, int startpos])
|ftp_fput| uploads the data from the file pointer {handle} until the end of
the file is reached. The results are stored in {remote_file} on the FTP
server. The transfer {mode} specified must be either FTP_ASCII or FTP_BINARY.
*ftp_get_option()* >
mixed ftp_get_option(resource ftp_stream, int option)
Returns the value on success or FALSE if the given {option} is not supported.
In the latter case, a warning message is also thrown.
*ftp_get()* >
bool ftp_get(resource ftp_stream, string local_file, string remote_file, int mode [, int resumepos])
|ftp_get| retrieves {remote_file} from the FTP server, and saves it to
{local_file} locally. The transfer {mode} specified must be either FTP_ASCII
or FTP_BINARY.
*ftp_login()* >
bool ftp_login(resource ftp_stream, string username, string password)
Logs in to the given FTP stream.
*ftp_mdtm()* >
int ftp_mdtm(resource ftp_stream, string remote_file)
|ftp_mdtm| checks the last modified time for a file, and returns it as a Unix
timestamp. If an error occurs, or the file does not exist, -1 is returned.
*ftp_mkdir()* >
string ftp_mkdir(resource ftp_stream, string directory)
Creates the specified {directory} on the FTP server.
*ftp_nb_continue()* >
int ftp_nb_continue(resource ftp_stream)
Continues retrieving/sending a file non-blocking.
*ftp_nb_fget()* >
int ftp_nb_fget(resource ftp_stream, resource handle, string remote_file, int mode [, int resumepos])
|ftp_nb_fget| retrieves {remote_file} from the FTP server, and writes it to
the given file pointer, {handle}. The transfer {mode} specified must be
either FTP_ASCII or FTP_BINARY. The difference between this function and the
|ftp_fget| is that this function retrieves the file asynchronously, so your
program can perform other operations while the file is being downloaded.
*ftp_nb_fput()* >
int ftp_nb_fput(resource ftp_stream, string remote_file, resource handle, int mode [, int startpos])
|ftp_nb_fput| uploads the data from the file pointer {handle} until it reaches
the end of the file. The results are stored in {remote_file} on the FTP
server. The transfer {mode} specified must be either FTP_ASCII or FTP_BINARY.
The difference between this function and the |ftp_fput| is that this function
uploads the file asynchronously, so your program can perform other operations
while the file is being uploaded.
*ftp_nb_get()* >
int ftp_nb_get(resource ftp_stream, string local_file, string remote_file, int mode [, int resumepos])
|ftp_nb_get| retrieves {remote_file} from the FTP server, and saves it to
{local_file} locally. The transfer {mode} specified must be either FTP_ASCII
or FTP_BINARY. The difference between this function and the |ftp_get| is that
this function retrieves the file asynchronously, so your program can perform
other operations while the file is being downloaded.
*ftp_nb_put()* >
int ftp_nb_put(resource ftp_stream, string remote_file, string local_file, int mode [, int startpos])
|ftp_nb_put| stores {local_file} on the FTP server, as {remote_file}. The
transfer {mode} specified must be either FTP_ASCII or FTP_BINARY. The
difference between this function and the |ftp_put| is that this function
uploads the file asynchronously, so your program can perform other operations
while the file is being uploaded.
*ftp_nlist()* >
array ftp_nlist(resource ftp_stream, string directory)
Returns an array of filenames from the specified directory on success or FALSE
on error.
*ftp_pasv()* >
bool ftp_pasv(resource ftp_stream, bool pasv)
|ftp_pasv| turns on passive mode if the {pasv} parameter is TRUE. It turns off
passive mode if {pasv} is FALSE. In passive mode, data connections are
initiated by the client, rather than by the server.
*ftp_put()* >
bool ftp_put(resource ftp_stream, string remote_file, string local_file, int mode [, int startpos])
|ftp_put| stores {local_file} on the FTP server, as {remote_file}. The
transfer {mode} specified must be either FTP_ASCII or FTP_BINARY.
*ftp_pwd()* >
string ftp_pwd(resource ftp_stream)
Returns the current directory or FALSE on error.
*ftp_quit()* >
void ftp_quit()
This function is an alias of |ftp_close|.
*ftp_raw()* >
array ftp_raw(resource ftp_stream, string command)
Sends an arbitrary {command} to the FTP server. Returns the server's response
as an array of strings. No parsing is performed on the response string, nor
does |ftp_raw| determine if the command succeeded.
*ftp_rawlist()* >
array ftp_rawlist(resource ftp_stream, string directory [, bool recursive])
|ftp_rawlist| executes the FTP LIST command, and returns the result as an
array. Each array element corresponds to one line of text. The output is not
parsed in any way. The system type identifier returned by |ftp_systype| can
be used to determine how the results should be interpreted.
*ftp_rename()* >
bool ftp_rename(resource ftp_stream, string from, string to)
|ftp_rename| renames the file or directory that is currently named {from} to
the new name {to}, using the FTP stream {ftp_stream}.
*ftp_rmdir()* >
bool ftp_rmdir(resource ftp_stream, string directory)
Removes the specified {directory}. {directory} must be either an absolute or
relative path to an empty directory.
*ftp_set_option()* >
bool ftp_set_option(resource ftp_stream, int option, mixed value)
Returns TRUE if the option could be set; FALSE if not. A warning message will
be thrown if the {option} is not supported or the passed {value} doesn't
match the expected value for the given {option}.
*ftp_site()* >
bool ftp_site(resource ftp_stream, string cmd)
|ftp_site| sends the command specified by {cmd} to the FTP server. SITE
commands are not standardized, and vary from server to server. They are
useful for handling such things as file permissions and group membership.
*ftp_size()* >
int ftp_size(resource ftp_stream, string remote_file)
|ftp_size| returns the size of a {remote_file} in bytes. If an error occurs,
or if the given file does not exist, or is a directory, -1 is returned. Not
all servers support this feature.
*ftp_ssl_connect()* >
resource ftp_ssl_connect(string host [, int port [, int timeout]])
Returns a SSL-FTP stream on success or FALSE on error.
*ftp_systype()* >
string ftp_systype(resource ftp_stream)
Returns the remote system type, or FALSE on error.
==============================================================================
Funchand *php-funchand*
*call_user_func_array()* >
mixed call_user_func_array(callback function, array param_arr)
Call a user defined function given by {function}, with the parameters in
{param_arr}. For example:
*call_user_func()* >
mixed call_user_func(callback function [, mixed parameter])
Call a user defined function given by the {function} parameter. Take the
following:
*create_function()* >
string create_function(string args, string code)
Creates an anonymous function from the parameters passed, and returns a unique
name for it. Usually the {args} will be passed as a single quote delimited
string, and this is also recommended for the {code}. The reason for using
single quoted strings, is to protect the variable names from parsing,
otherwise, if you use double quotes there will be a need to escape the
variable names, e.g. \$avar.
*func_get_arg()* >
mixed func_get_arg(int arg_num)
Returns the argument which is at the {arg_num}'th offset into a user-defined
function's argument list. Function arguments are counted starting from zero.
|func_get_arg| will generate a warning if called from outside of a function
definition. This function cannot be used directly as a function parameter.
Instead, its result may be assigned to a variable, which can then be passed
to the function.
*func_get_args()* >
array func_get_args()
Returns an array in which each element is the corresponding member of the
current user-defined function's argument list. |func_get_args| will generate
a warning if called from outside of a function definition. This function
cannot be used directly as a function parameter. Instead, its result may be
assigned to a variable, which can then be passed to the function.
*func_num_args()* >
int func_num_args()
Returns the number of arguments passed into the current user-defined function.
|func_num_args| will generate a warning if called from outside of a
user-defined function. This function cannot be used directly as a function
parameter. Instead, its result may be assigned to a variable, which can then
be passed to the function.
*function_exists()* >
bool function_exists(string function_name)
Checks the list of defined functions, both built-in (internal) and
user-defined, for {function_name}. Returns TRUE on success or FALSE on
failure.;
*get_defined_functions()* >
array get_defined_functions()
This function returns an multidimensional array containing a list of all
defined functions, both built-in (internal) and user-defined. The internal
functions will be accessible via $arr["internal"], and the user defined ones
using $arr["user"] (see example below).
*register_shutdown_function()* >
void register_shutdown_function(callback function [, mixed parameter])
Registers the function named by {function} to be executed when script
processing is complete.
*register_tick_function()* >
void register_tick_function(callback function [, mixed arg])
Registers the function named by {func} to be executed when a tick is called.
Also, you may pass an array consisting of an object and a method as the
{func}.
*unregister_tick_function()* >
void unregister_tick_function(string function_name)
De-registers the function named by {function_name} so it is no longer executed
when a tick is called.
==============================================================================
Gettext *php-gettext*
*bind_textdomain_codeset()* >
string bind_textdomain_codeset(string domain, string codeset)
With |bind_textdomain_codeset|, you can set in which encoding will be messages
from {domain} returned by |gettext| and similar functions.
*bindtextdomain()* >
string bindtextdomain(string domain, string directory)
The |bindtextdomain| function sets the path for a domain. It returns the full
pathname for the domain currently being set.
*dcgettext()* >
string dcgettext(string domain, string message, int category)
This function allows you to override the current domain for a single message
lookup. It also allows you to specify a {category}.
*dcngettext()* >
string dcngettext(string domain, string msgid1, string msgid2, int n, int category)
This function allows you to override the current domain for a single plural
message lookup. It also allows you to specify a {category}.
*dgettext()* >
string dgettext(string domain, string message)
The |dgettext| function allows you to override the current domain for a single
message lookup.
*dngettext()* >
string dngettext(string domain, string msgid1, string msgid2, int n)
The |dngettext| function allows you to override the current domain for a
single plural message lookup.
*gettext()* >
string gettext(string message)
This function returns a translated string if one is found in the translation
table, or the submitted message if not found. You may use the underscore
character '_' as an alias to this function.
*ngettext()* >
string ngettext(string msgid1, string msgid2, int n)
|ngettext| returns correct plural form of message identified by {msgid1} and
{msgid2} for count {n}. Some languages have more than one form for plural
messages dependent on the count.
*textdomain()* >
string textdomain(string text_domain)
This function sets the domain to search within when calls are made to
|gettext|, usually the named after an application. The previous default
domain is returned. Call it with NULL as parameter to get the current setting
without changing it.
==============================================================================
Gmp *php-gmp*
*gmp_abs()* >
resource gmp_abs(resource a)
Returns absolute value of {a}.
*gmp_add()* >
resource gmp_add(resource a, resource b)
Add two GMP numbers. The result will be a GMP number representing the sum of
the arguments.
*gmp_and()* >
resource gmp_and(resource a, resource b)
Calculates logical AND of two GMP numbers.
*gmp_clrbit()* >
void gmp_clrbit(int index)
Clears (sets to 0) bit {index} in {a}. The index starts at 0.
*gmp_cmp()* >
int gmp_cmp(resource a, resource b)
Returns a positive value if a > b, zero if a = b and a negative value if a <
b.
*gmp_com()* >
resource gmp_com(resource a)
Returns the one's complement of {a}.
*gmp_div_q()* >
resource gmp_div_q(resource a, resource b [, int round])
Divides {a} by {b} and returns the integer result. The result rounding is
defined by the {round}, which can have the following values:
{GMP_ROUND_ZERO}: The result is truncated towards 0. {GMP_ROUND_PLUSINF}: The
result is rounded towards +infinity. {GMP_ROUND_MINUSINF}: The result is
rounded towards -infinity.
*gmp_div_qr()* >
array gmp_div_qr(resource n, resource d [, int round])
The function divides {n} by {d} and returns array, with the first element
being [n/d] (the integer result of the division) and the second being (n -
[n/d] * d) (the remainder of the division).
*gmp_div_r()* >
resource gmp_div_r(resource n, resource d [, int round])
Calculates remainder of the integer division of {n} by {d}. The remainder has
the sign of the {n} argument, if not zero.
*gmp_div()* >
void gmp_div()
This function is an alias of |gmp_div_q|.
*gmp_divexact()* >
resource gmp_divexact(resource n, resource d)
Divides {n} by {d}, using fast "exact division" algorithm. This function
produces correct results only when it is known in advance that {d} divides
{n}.
*gmp_fact()* >
resource gmp_fact(int a)
Calculates factorial (a!) of {a}.
*gmp_gcd()* >
resource gmp_gcd(resource a, resource b)
Calculate greatest common divisor of {a} and {b}. The result is always
positive even if either of, or both, input operands are negative.
*gmp_gcdext()* >
array gmp_gcdext(resource a, resource b)
Calculates g, s, and t, such that a*s + b*t = g = gcd(a,b), where gcd is the
greatest common divisor. Returns an array with respective elements g, s and
t.
*gmp_hamdist()* >
int gmp_hamdist(resource a, resource b)
Returns the hamming distance between {a} and {b}. Both operands should be
non-negative.
*gmp_init()* >
resource gmp_init(mixed number [, int base])
Creates a GMP number from an integer or string. String representation can be
decimal or hexadecimal. In the latter case, the string should start with 0x.
Optional parameter {base} is available since PHP 4.1.0.
*gmp_intval()* >
int gmp_intval(resource gmpnumber)
This function allows to convert GMP number to integer. This function returns a
useful result only if the number actually fits the PHP integer (i.e., signed
long type). If you want just to print the GMP number, use |gmp_strval|.
*gmp_invert()* >
resource gmp_invert(resource a, resource b)
Computes the inverse of {a} modulo {b}. Returns FALSE if an inverse does not
exist.
*gmp_jacobi()* >
int gmp_jacobi(resource a, resource p)
Computes Jacobi symbol of {a} and {p}. {p} should be odd and must be positive.
*gmp_legendre()* >
int gmp_legendre(resource a, resource p)
Compute the Legendre symbol of {a} and {p}. {p} should be odd and must be
positive.
*gmp_mod()* >
resource gmp_mod(resource n, resource d)
Calculates {n} modulo {d}. The result is always non-negative, the sign of {d}
is ignored.
*gmp_mul()* >
resource gmp_mul(resource a, resource b)
Multiplies {a} by {b} and returns the result.
*gmp_neg()* >
resource gmp_neg(resource a)
Returns -{a}.
*gmp_or()* >
resource gmp_or(resource a, resource b)
Calculates logical inclusive OR of two GMP numbers.
*gmp_perfect_square()* >
bool gmp_perfect_square(resource a)
Returns TRUE if {a} is a perfect square, FALSE otherwise.
*gmp_popcount()* >
int gmp_popcount(resource a)
Return the population count of {a}.
*gmp_pow()* >
resource gmp_pow(resource base, int exp)
Raise {base} into power {exp}. The case of 0^0 yields 1. {exp} cannot be
negative.
*gmp_powm()* >
resource gmp_powm(resource base, resource exp, resource mod)
Calculate ({base} raised into power {exp}) modulo {mod}. If {exp} is negative,
result is undefined.
*gmp_prob_prime()* >
int gmp_prob_prime(resource a [, int reps])
If this function returns 0, {a} is definitely not prime. If it returns 1, then
{a} is "probably" prime. If it returns 2, then {a} is surely prime. Reasonable
values of {reps} vary from 5 to 10 (default being 10); a higher value lowers
the probability for a non-prime to pass as a "probable" prime.
*gmp_random()* >
resource gmp_random(int limiter)
Generate a random number. The number will be between zero and the number of
bits per limb multiplied by {limiter}. If {limiter} is negative, negative
numbers are generated.
*gmp_scan0()* >
int gmp_scan0(resource a, int start)
Scans {a}, starting with bit {start}, towards more significant bits, until the
first clear bit is found. Returns the index of the found bit. The index starts
from 0.
*gmp_scan1()* >
int gmp_scan1(resource a, int start)
Scans {a}, starting with bit {start}, towards more significant bits, until the
first set bit is found. Returns the index of the found bit. If no set bit is
found, -1 is returned.
*gmp_setbit()* >
void gmp_setbit(int index [, bool set_clear])
Sets bit {index} in {a}. {set_clear} defines if the bit is set to 0 or 1. By
default the bit is set to 1. Index starts at 0.
*gmp_sign()* >
int gmp_sign(resource a)
Returns 1 if {a} is positive, -1 if {a} is negative, and 0 if {a} is zero.
*gmp_sqrt()* >
resource gmp_sqrt(resource a)
Calculates square root of {a} and returns the integer portion of the result.
*gmp_sqrtrem()* >
array gmp_sqrtrem(resource a)
Returns array where first element is the integer square root of {a} (see also
|gmp_sqrt|), and the second is the remainder (i.e., the difference between
{a} and the first element squared).
*gmp_strval()* >
string gmp_strval(resource gmpnumber [, int base])
Convert GMP number to string representation in base {base}. The default base
is 10. Allowed values for the base are from 2 to 36.
*gmp_sub()* >
resource gmp_sub(resource a, resource b)
Subtracts {b} from {a} and returns the result.
*gmp_xor()* >
resource gmp_xor(resource a, resource b)
Calculates logical exclusive OR (XOR) of two GMP numbers.
==============================================================================
Http *php-http*
*header()* >
void header(string string [, bool replace [, int http_response_code]])
|header| is used to send raw HTTP headers. See the HTTP/1.1 specification for
more information on HTTP headers.
*headers_list()* >
array headers_list()
|headers_list| will return a numerically indexed array of headers to be sent
to the browser / client. To determine whether or not these headers have been
sent yet, use |headers_sent|.
*headers_sent()* >
bool headers_sent()
|headers_sent| will return FALSE if no HTTP headers have already been sent or
TRUE otherwise. If the optional {file} and {line} parameters are set,
|headers_sent| will put the PHP source file name and line number where output
started in the {file} and {line} variables.
*setcookie()* >
bool setcookie(string name [, string value [, int expire [, string path [, string domain [, bool secure]]]]])
|setcookie| defines a cookie to be sent along with the rest of the HTTP
headers. Like other headers, cookies must be sent before any output from your
script (this is a protocol restriction). This requires that you place calls to
this function prior to any output, including and