diff --git a/reference/fdf/functions/fdf-add-doc-javascript.xml b/reference/fdf/functions/fdf-add-doc-javascript.xml index a747550c72..0064937b37 100644 --- a/reference/fdf/functions/fdf-add-doc-javascript.xml +++ b/reference/fdf/functions/fdf-add-doc-javascript.xml @@ -1,5 +1,5 @@ - + @@ -31,19 +31,21 @@ fdf_save($fdf); ?> ]]> - will create a FDF like this: + + will create a FDF like this: + > >> ->> +<< +/FDF << /JavaScript << /Doc [ (PlusOne)(function PlusOne\(x\)\r{\r return x+1;\r}\r)] >> >> +>> endobj trailer << -/Root 1 0 R +/Root 1 0 R >> %%EOF diff --git a/reference/fdf/functions/fdf-add-template.xml b/reference/fdf/functions/fdf-add-template.xml index 4f258b8683..fe13aa00e0 100644 --- a/reference/fdf/functions/fdf-add-template.xml +++ b/reference/fdf/functions/fdf-add-template.xml @@ -1,26 +1,26 @@ - + - - - fdf_add_template - Adds a template into the FDF document - - - Description - - boolfdf_add_template - resourcefdfdoc - intnewpage - stringfilename - stringtemplate - intrename - - - &warn.undocumented.func; - - - + + + fdf_add_template + Adds a template into the FDF document + + + Description + + boolfdf_add_template + resourcefdfdoc + intnewpage + stringfilename + stringtemplate + intrename + + + &warn.undocumented.func; + + + + - - - fdf_close - Close an FDF document - - - Description - - voidfdf_close - resourcefdf_document - - - The fdf_close function closes the FDF document. - - - See also fdf_open. - - - + + + fdf_close + Close an FDF document + + + Description + + voidfdf_close + resourcefdf_document + + + The fdf_close function closes the FDF document. + + + See also fdf_open. + + + + - - - fdf_create - Create a new FDF document - - - Description - - resourcefdf_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. - - - Populating a PDF document - + + + fdf_create + Create a new FDF document + + + Description + + resourcefdf_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. + + + + Populating a PDF document + ]]> - - - - - See also fdf_close, - fdf_save, - fdf_open. - - - + + + + + See also fdf_close, + fdf_save, + fdf_open. + + + - - - fdf_enum_values - Call a user defined function for each document value - - - Description - - boolfdf_enum_values - resourcefdfdoc - callbackfunction - mixeduserdata - - + + + + fdf_enum_values + Call a user defined function for each document value + + + Description + + boolfdf_enum_values + resourcefdfdoc + callbackfunction + mixeduserdata + + &warn.undocumented.func; - - - + + + + fdf_errno @@ -13,14 +13,14 @@ fdf_errno returns the error code set by - the last FDF function call. This is zero + 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. + A textual description may be obtained using the + fdf_error function. See also fdf_error. - + diff --git a/reference/fdf/functions/fdf-error.xml b/reference/fdf/functions/fdf-error.xml index 34a4e9ccbb..1887a8f13d 100644 --- a/reference/fdf/functions/fdf-error.xml +++ b/reference/fdf/functions/fdf-error.xml @@ -1,5 +1,5 @@ - + fdf_error @@ -12,16 +12,16 @@ interror_code - fdf_error returns a textual description for + 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 + 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()). See also fdf_errno. - + diff --git a/reference/fdf/functions/fdf-get-ap.xml b/reference/fdf/functions/fdf-get-ap.xml index 211bf6fa86..c4e70ec715 100644 --- a/reference/fdf/functions/fdf-get-ap.xml +++ b/reference/fdf/functions/fdf-get-ap.xml @@ -1,5 +1,5 @@ - + @@ -19,10 +19,10 @@ 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 + are FDFNormalAP, FDFRolloverAP and + FDFDownAP. The appearance is stored in filename. - + diff --git a/reference/fdf/functions/fdf-get-attachment.xml b/reference/fdf/functions/fdf-get-attachment.xml index 595b65de2b..e5e918f91a 100644 --- a/reference/fdf/functions/fdf-get-attachment.xml +++ b/reference/fdf/functions/fdf-get-attachment.xml @@ -1,5 +1,5 @@ - + fdf_get_attachment @@ -15,10 +15,10 @@ Extracts a file uploaded by means of the "file selection" field - fieldname and stores it under - savepath. savepath may be + 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. + under its original name. Any existing file under the same name will be overwritten. @@ -42,7 +42,7 @@ Storing an uploaded file - + @@ -17,7 +17,8 @@ of the /F key. - See also fdf_set_file. + See also fdf_set_file. + diff --git a/reference/fdf/functions/fdf-get-flags.xml b/reference/fdf/functions/fdf-get-flags.xml index 4f766d213b..99f52ec5d6 100644 --- a/reference/fdf/functions/fdf-get-flags.xml +++ b/reference/fdf/functions/fdf-get-flags.xml @@ -1,23 +1,23 @@ - - - - fdf_get_flags - Gets the flags of a field - - - Description - - intfdf_get_flags - resourcefdfdoc - stringfieldname - intwhichflags - - + + + + fdf_get_flags + Gets the flags of a field + + + Description + + intfdf_get_flags + resourcefdfdoc + stringfieldname + intwhichflags + + &warn.undocumented.func; - - - + + + - - - fdf_get_opt - Gets a value from the opt array of a field - - - Description - - mixedfdf_get_opt - resourcefdfdof - stringfieldname - intelement - - + + + + fdf_get_opt + Gets a value from the opt array of a field + + + Description + + mixedfdf_get_opt + resourcefdfdof + stringfieldname + intelement + + &warn.undocumented.func; - - - + + + + @@ -19,19 +19,19 @@ value for the requested fieldname. - Elements of an array field can be retrieved by passing the optional + Elements of an array field can be retrieved by passing the optional which, starting at zero. For non-array fields the optional parameter which will be ignored. - Array support and optional which parameter - were added in PHP 4.3. + Array support and optional which parameter + were added in PHP 4.3. See also fdf_set_value. - + diff --git a/reference/fdf/functions/fdf-get-version.xml b/reference/fdf/functions/fdf-get-version.xml index 7ea3e27445..ac5daf6003 100644 --- a/reference/fdf/functions/fdf-get-version.xml +++ b/reference/fdf/functions/fdf-get-version.xml @@ -1,5 +1,5 @@ - + fdf_get_version @@ -12,17 +12,17 @@ resourcefdf_document - This function will return the fdf version for the given + This function will return the fdf version for the given fdf_document, or the toolkit API - version number if no parameter is given. + version number if no parameter is given. - + For the current FDF toolkit 5.0 the API version number is '5.0' and the document version number is either '1.2', '1.3' or '1.4'. See also fdf_set_version. - + diff --git a/reference/fdf/functions/fdf-header.xml b/reference/fdf/functions/fdf-header.xml index 74fe54ddeb..3a2341ef85 100644 --- a/reference/fdf/functions/fdf-header.xml +++ b/reference/fdf/functions/fdf-header.xml @@ -1,5 +1,5 @@ - + fdf_header @@ -14,8 +14,8 @@ This is a convenience function to set appropriate HTTP headers for FDF output. It sets the Content-type: - to application/vnd.fdf. - + to application/vnd.fdf. + diff --git a/reference/fdf/functions/fdf-next-field-name.xml b/reference/fdf/functions/fdf-next-field-name.xml index 07ea108120..fd4e61e0e2 100644 --- a/reference/fdf/functions/fdf-next-field-name.xml +++ b/reference/fdf/functions/fdf-next-field-name.xml @@ -1,5 +1,5 @@ - + @@ -26,11 +26,11 @@ ]]> @@ -38,7 +38,7 @@ for ($field = fdf_next_field_name($fdf); See also fdf_get_value. - + diff --git a/reference/fdf/functions/fdf-open-string.xml b/reference/fdf/functions/fdf-open-string.xml index de060978a9..fd74be297b 100644 --- a/reference/fdf/functions/fdf-open-string.xml +++ b/reference/fdf/functions/fdf-open-string.xml @@ -1,5 +1,5 @@ - + fdf_open_string @@ -12,10 +12,10 @@ stringfdf_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. + 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. You can fdf_open_string together with @@ -37,7 +37,7 @@ fdf_close($fdf); - See also + See also fdf_open, fdf_close, fdf_create and diff --git a/reference/fdf/functions/fdf-open.xml b/reference/fdf/functions/fdf-open.xml index 9c689516ed..cabde4e0b6 100644 --- a/reference/fdf/functions/fdf-open.xml +++ b/reference/fdf/functions/fdf-open.xml @@ -1,5 +1,5 @@ - + @@ -15,11 +15,11 @@ 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. + from a PDF form or created using fdf_create and + fdf_save. - You can process the results of a PDF form POST request by writing + You can process the results of a PDF form POST request by writing the data received in $HTTP_FDF_DATA to a file and open it using fdf_open. Starting with PHP 4.3 you can also use fdf_open_string which handles temporary @@ -46,7 +46,7 @@ fdf_close($fdf); - See also + See also fdf_open_string, fdf_close, fdf_create and diff --git a/reference/fdf/functions/fdf-remove-item.xml b/reference/fdf/functions/fdf-remove-item.xml index 8080e72ef8..297b368b46 100644 --- a/reference/fdf/functions/fdf-remove-item.xml +++ b/reference/fdf/functions/fdf-remove-item.xml @@ -1,23 +1,23 @@ - - - - fdf_remove_item - Sets target frame for form - - - Description - - boolfdf_remove_item - resourcefdfdoc - stringfieldname - intitem - - + + + + fdf_remove_item + Sets target frame for form + + + Description + + boolfdf_remove_item + resourcefdfdoc + stringfieldname + intitem + + &warn.undocumented.func; - - - + + + + fdf_save_string @@ -37,18 +37,18 @@ echo $str; %FDF-1.2 %âãÏÓ 1 0 obj -<< -/FDF << /Fields 2 0 R >> ->> +<< +/FDF << /Fields 2 0 R >> +>> endobj 2 0 obj -[ -<< /T (foo)/V (bar)>> +[ +<< /T (foo)/V (bar)>> ] endobj trailer << -/Root 1 0 R +/Root 1 0 R >> %%EOF @@ -56,15 +56,12 @@ trailer - - See also fdf_save, - fdf_open_string, - fdf_create and + fdf_open_string, + fdf_create and fdf_close. - diff --git a/reference/fdf/functions/fdf-save.xml b/reference/fdf/functions/fdf-save.xml index 70b65330d3..c8f6346344 100644 --- a/reference/fdf/functions/fdf-save.xml +++ b/reference/fdf/functions/fdf-save.xml @@ -1,5 +1,5 @@ - + @@ -15,17 +15,15 @@ The fdf_save function saves a FDF document. - The resulting FDF will be written to filename. + The resulting FDF will be written to filename. Without a filename fdf_save will write the FDF to the default PHP output stream. - See also fdf_save_string, - fdf_create and + fdf_create and fdf_close. - diff --git a/reference/fdf/functions/fdf-set-ap.xml b/reference/fdf/functions/fdf-set-ap.xml index ed038f7197..4cdaff2f6a 100644 --- a/reference/fdf/functions/fdf-set-ap.xml +++ b/reference/fdf/functions/fdf-set-ap.xml @@ -1,5 +1,5 @@ - + @@ -20,7 +20,7 @@ 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 + are FDFNormalAP, FDFRolloverAP and FDFDownAP. diff --git a/reference/fdf/functions/fdf-set-encoding.xml b/reference/fdf/functions/fdf-set-encoding.xml index 77eab8a4cd..71fa81da11 100644 --- a/reference/fdf/functions/fdf-set-encoding.xml +++ b/reference/fdf/functions/fdf-set-encoding.xml @@ -1,5 +1,5 @@ - + @@ -11,13 +11,13 @@ boolfdf_set_encoding resourcefdf_document - stringencoding + stringencoding 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: + 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 diff --git a/reference/fdf/functions/fdf-set-file.xml b/reference/fdf/functions/fdf-set-file.xml index bceaa2be0f..01f93522b6 100644 --- a/reference/fdf/functions/fdf-set-file.xml +++ b/reference/fdf/functions/fdf-set-file.xml @@ -1,11 +1,11 @@ - + fdf_set_file Set PDF document to display FDF data in - + Description @@ -17,17 +17,18 @@ 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 + from. The url needs to be given as an absolute URL. - The frame to display the document in may be selected using the optional - parameter target_frame or the function + The frame to display the document in may be selected using the optional + parameter target_frame or the function fdf_set_target_frame. - - Passing FDF data to a second form - + + + Passing FDF data to a second form + ]]> - - + + + See also fdf_get_file and fdf_set_target_frame. - + diff --git a/reference/fdf/functions/fdf-set-flags.xml b/reference/fdf/functions/fdf-set-flags.xml index fcce425c4e..a7a30bb545 100644 --- a/reference/fdf/functions/fdf-set-flags.xml +++ b/reference/fdf/functions/fdf-set-flags.xml @@ -1,29 +1,29 @@ - + - - - fdf_set_flags - Sets a flag of a field - - - Description - - boolfdf_set_flags - resourcefdf_document - stringfieldname - intwhichFlags - intnewFlags - - - The fdf_set_flags sets certain flags - of the given field fieldname. - - - See also fdf_set_opt. - - - + + + fdf_set_flags + Sets a flag of a field + + + Description + + boolfdf_set_flags + resourcefdf_document + stringfieldname + intwhichFlags + intnewFlags + + + The fdf_set_flags sets certain flags + of the given field fieldname. + + + See also fdf_set_opt. + + + + - - - fdf_set_javascript_action - Sets an javascript action of a field - - - Description - - boolfdf_set_javascript_action - resourcefdf_document - stringfieldname - inttrigger - stringscript - - - fdf_set_javascript_action sets a javascript - action for the given field fieldname. - - - See also fdf_set_submit_form_action. - - - + + + fdf_set_javascript_action + Sets an javascript action of a field + + + Description + + boolfdf_set_javascript_action + resourcefdf_document + stringfieldname + inttrigger + stringscript + + + fdf_set_javascript_action sets a javascript + action for the given field fieldname. + + + See also fdf_set_submit_form_action. + + + + fdf_set_on_import_javascript @@ -13,9 +13,7 @@ stringscript boolbefore_data_import - &warn.undocumented.func; - See also fdf_add_doc_javascript&listendand; diff --git a/reference/fdf/functions/fdf-set-opt.xml b/reference/fdf/functions/fdf-set-opt.xml index 11dce77977..af3c645dec 100644 --- a/reference/fdf/functions/fdf-set-opt.xml +++ b/reference/fdf/functions/fdf-set-opt.xml @@ -1,30 +1,30 @@ - + - - - fdf_set_opt - Sets an option of a field - - - Description - - boolfdf_set_opt - resourcefdf_document - stringfieldname - intelement - stringstr1 - stringstr2 - - - The fdf_set_opt sets options - of the given field fieldname. - - - See also fdf_set_flags. - - - + + + fdf_set_opt + Sets an option of a field + + + Description + + boolfdf_set_opt + resourcefdf_document + stringfieldname + intelement + stringstr1 + stringstr2 + + + The fdf_set_opt sets options + of the given field fieldname. + + + See also fdf_set_flags. + + + + fdf_set_status - Set the value of the /STATUS key + Set the value of the /STATUS key - + Description boolfdf_set_status diff --git a/reference/fdf/functions/fdf-set-submit-form-action.xml b/reference/fdf/functions/fdf-set-submit-form-action.xml index 9ef887b2b5..510c3318d6 100644 --- a/reference/fdf/functions/fdf-set-submit-form-action.xml +++ b/reference/fdf/functions/fdf-set-submit-form-action.xml @@ -1,12 +1,12 @@ - + fdf_set_submit_form_action Sets a submit form action of a field - + Description boolfdf_set_submit_form_action diff --git a/reference/fdf/functions/fdf-set-target-frame.xml b/reference/fdf/functions/fdf-set-target-frame.xml index d75d407e6a..924317abb4 100644 --- a/reference/fdf/functions/fdf-set-target-frame.xml +++ b/reference/fdf/functions/fdf-set-target-frame.xml @@ -1,5 +1,5 @@ - + fdf_set_target_frame @@ -17,7 +17,7 @@ See also fdf_save_file. - + diff --git a/reference/fdf/functions/fdf-set-value.xml b/reference/fdf/functions/fdf-set-value.xml index 76a8a58edf..9b401fa6f3 100644 --- a/reference/fdf/functions/fdf-set-value.xml +++ b/reference/fdf/functions/fdf-set-value.xml @@ -1,5 +1,5 @@ - + fdf_set_value @@ -16,15 +16,15 @@ The fdf_set_value function sets the - value for a field named fieldname. + 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. + In this case all array elements will be stored as a value array. In older versions of the fdf toolkit last parameter determined if the field value was to be converted to a PDF Name (isName = 1) - or set to a PDF String (isName = 0). The value is no + or set to a PDF String (isName = 0). The value is no longer used in the current toolkit version 5.0. For compatibility reasons it is still supported as an optional parameter beginning with PHP 4.3, but ignored internally. @@ -33,7 +33,7 @@ - See also fdf_get_value and + See also fdf_get_value and fdf_remove_item. diff --git a/reference/fdf/functions/fdf-set-version.xml b/reference/fdf/functions/fdf-set-version.xml index 9967ebbe15..7879b2e771 100644 --- a/reference/fdf/functions/fdf-set-version.xml +++ b/reference/fdf/functions/fdf-set-version.xml @@ -1,5 +1,5 @@ - + fdf_set_version @@ -16,12 +16,12 @@ 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 + For the current FDF toolkit 5.0 version may be either '1.2', '1.3' or '1.4'. See also fdf_get_version. - + diff --git a/reference/misc/functions/connection-aborted.xml b/reference/misc/functions/connection-aborted.xml index 616d56774c..0d6af0e79c 100644 --- a/reference/misc/functions/connection-aborted.xml +++ b/reference/misc/functions/connection-aborted.xml @@ -1,29 +1,29 @@ - + - - - connection_aborted - Returns &true; if client disconnected - - - Description - - intconnection_aborted - - - - Returns &true; if client disconnected. See the Connection Handling - description in the Features - chapter for a complete explanation. - - - See also connection_status, and - ignore_user_abort. - - - + + + connection_aborted + Returns &true; if client disconnected + + + Description + + intconnection_aborted + + + + Returns &true; if client disconnected. See the Connection Handling + description in the Features + chapter for a complete explanation. + + + See also connection_status, and + ignore_user_abort. + + + + - - - connection_status - Returns connection status bitfield - - - Description - - intconnection_status - - - - Returns the connection status bitfield. See the Connection Handling - description in the Features - chapter for a complete explanation. - - - See also connection_aborted, and - ignore_user_abort. - - - + + + connection_status + Returns connection status bitfield + + + Description + + intconnection_status + + + + Returns the connection status bitfield. See the Connection Handling + description in the Features + chapter for a complete explanation. + + + See also connection_aborted, and + ignore_user_abort. + + + + - - - connection_timeout - Return &true; if script timed out - - - Description - - boolconnection_timeout - - - - Returns &true; if script timed out. - - - Deprecated - - This function is deprecated, and doesn't even exist anymore - as of 4.0.5. - - - - - - See the Connection Handling - description in the Features - chapter for a complete explanation. - - - See also connection_status. - - - + + + connection_timeout + Return &true; if script timed out + + + Description + + boolconnection_timeout + + + + Returns &true; if script timed out. + + + Deprecated + + This function is deprecated, and doesn't even exist anymore + as of 4.0.5. + + + + + + See the Connection Handling + description in the Features + chapter for a complete explanation. + + + See also connection_status. + + + + - - - constant - Returns the value of a constant - - - Description - - mixedconstant - stringname - - - constant will return the value of the - constant indicated by name. - - - constant is useful if you need to retrieve - the value of a constant, but do not know its name. I.e. it is - stored in a variable or returned by a function. - - - This function works also with class constants. - - - - <function>constant</function> example - + + + constant + Returns the value of a constant + + + Description + + mixedconstant + stringname + + + constant will return the value of the + constant indicated by name. + + + constant is useful if you need to retrieve + the value of a constant, but do not know its name. I.e. it is + stored in a variable or returned by a function. + + + This function works also with class constants. + + + + <function>constant</function> example + ]]> - - - - - See also define, - defined and the section on Constants. - - - + + + + + See also define, + defined and the section on Constants. + + + + - - - define - Defines a named constant - - - Description - - booldefine - stringname - mixedvalue - boolcase_insensitive - - - Defines a named constant at runtime. See the - section on constants - for more details. - - - The name of the constant is given by name; - the value is given by value. - - - The optional third parameter - case_insensitive is also available. If the - value &true; is given, then the constant will be - defined case-insensitive. The default behaviour is - case-sensitive; i.e. CONSTANT and Constant represent different - values. - - - - Defining Constants - + + + define + Defines a named constant + + + Description + + booldefine + stringname + mixedvalue + boolcase_insensitive + + + Defines a named constant at runtime. See the + section on constants + for more details. + + + The name of the constant is given by name; + the value is given by value. + + + The optional third parameter + case_insensitive is also available. If the + value &true; is given, then the constant will be + defined case-insensitive. The default behaviour is + case-sensitive; i.e. CONSTANT and Constant represent different + values. + + + + Defining Constants + ]]> - - - - - &return.success; - - - See also defined, - constant and the section on Constants. - - - + + + + + &return.success; + + + See also defined, + constant and the section on Constants. + + + + - - - defined - - Checks whether a given named constant exists - - - - Description - - booldefined - stringname - - - Returns &true; if the named constant given by - name has been defined, - &false; otherwise. - - - - Checking Constants - + + + defined + Checks whether a given named constant exists + + + Description + + booldefined + stringname + + + Returns &true; if the named constant given by + name has been defined, + &false; otherwise. + + + + Checking Constants + ]]> - - - - - - If you want to see if a variable exists, use - isset as defined only - applies to constants. - If you want to see if a function exists, use - function_exists. - - - - See also define, - constant, - get_defined_constants, - function_exists, and the section on - Constants. - - - + + + + + + If you want to see if a variable exists, use + isset as defined only + applies to constants. + If you want to see if a function exists, use + function_exists. + + + + See also define, + constant, + get_defined_constants, + function_exists, and the section on + Constants. + + + + - - - die - Equivalent to exit - - - Description - - This language construct is equivalent to exit. - - - + + + die + Equivalent to exit + + + Description + + This language construct is equivalent to exit. + + + + - - - eval - Evaluate a string as PHP code - - - Description - - mixedeval - stringcode_str - - - eval evaluates the string given in - code_str as PHP code. Among other things, - this can be useful for storing code in a database text field for - later execution. code_str does not have to - contain PHP Opening - tags. - - - There are some factors to keep in mind when using - eval. Remember that the string passed must - be valid PHP code, including things like terminating statements - with a semicolon so the parser doesn't die on the line after the - eval, and properly escaping things in - code_str. To mix HTML output and PHP code - you can use a closing PHP tag to leave PHP mode. - - - Also remember that variables given values under - eval will retain these values in the main - script afterwards. - - - A return statement will terminate the evaluation of - the string immediately. As of PHP 4, eval returns - &null; unless return is called in the evaluated - code, in which case the value passed to return is - returned. In case of a parse error in the evaluated code, - eval returns &false;. - In case of a fatal error in the evaluated code, the whole script exits. - In PHP 3, eval does not return a value. - - - - - <function>eval</function> example - simple text merge - - + + + eval + Evaluate a string as PHP code + + + Description + + mixedeval + stringcode_str + + + eval evaluates the string given in + code_str as PHP code. Among other things, + this can be useful for storing code in a database text field for + later execution. code_str does not have to + contain PHP Opening + tags. + + + There are some factors to keep in mind when using + eval. Remember that the string passed must + be valid PHP code, including things like terminating statements + with a semicolon so the parser doesn't die on the line after the + eval, and properly escaping things in + code_str. To mix HTML output and PHP code + you can use a closing PHP tag to leave PHP mode. + + + Also remember that variables given values under + eval will retain these values in the main + script afterwards. + + + A return statement will terminate the evaluation of + the string immediately. As of PHP 4, eval returns + &null; unless return is called in the evaluated + code, in which case the value passed to return is + returned. In case of a parse error in the evaluated code, + eval returns &false;. + In case of a fatal error in the evaluated code, the whole script exits. + In PHP 3, eval does not return a value. + + + + + <function>eval</function> example - simple text merge + + ]]> - - &example.outputs; - + + &example.outputs; + - - - - &tip.ob-capture; - - See also call_user_func. - - - + + + + &tip.ob-capture; + + See also call_user_func. + + + + - - - exit - Output a message and terminate the current script - - - Description - - voidexit - stringstatus - - - voidexit - intstatus - - - - This is not a real function, but a language construct. - - - - - PHP >= 4.2.0 does NOT print the status - if it is an integer. - - - - The exit function terminates execution of - the script. It prints status just before exiting. - - - If status is an integer, that value - will also be used as the exit status. Exit statuses should be in the - range 0 to 254, the exit status 255 is reserved by PHP and shall not be - used. The status 0 is used to terminate the program successfully. - - - - <function>exit</function> example - + + + exit + Output a message and terminate the current script + + + Description + + voidexit + stringstatus + + + voidexit + intstatus + + + + This is not a real function, but a language construct. + + + + + PHP >= 4.2.0 does NOT print the status + if it is an integer. + + + + The exit function terminates execution of + the script. It prints status just before exiting. + + + If status is an integer, that value + will also be used as the exit status. Exit statuses should be in the + range 0 to 254, the exit status 255 is reserved by PHP and shall not be + used. The status 0 is used to terminate the program successfully. + + + + <function>exit</function> example + ]]> - - - - - - <function>exit</function> status example - + + + + + + <function>exit</function> status example + ]]> - - - - - - This language construct is equivalent to die. - - - - See also: register_shutdown_function. - - - + + + + + + This language construct is equivalent to die. + + + + See also: register_shutdown_function. + + + + - - - get_browser - - Tells what the user's browser is capable of - - - - Description - - mixedget_browser - stringuser_agent - boolreturn_array - - - get_browser attempts to determine the - capabilities of the user's browser. This is done by looking up - the browser's information in the browscap.ini - file. - - - By default, the value of HTTP User-Agent header is - used; however, you can alter this (i.e., look up another browser's - info) by passing the optional user_agent parameter to - get_browser. You can bypass user_agent - parameter with &null; value. - - - The information is returned in an object, which will contain - various data elements representing, for instance, the browser's - major and minor version numbers and ID string; &true;/&false; values - for features such as frames, JavaScript, and cookies; and so - forth. - - - As of PHP 4.3.2, if the optional parameter - return_array is &true;, this function will return an - array instead of an object. - - - - Listing all information about the users browser - + + + get_browser + Tells what the user's browser is capable of + + + Description + + mixedget_browser + stringuser_agent + boolreturn_array + + + get_browser attempts to determine the + capabilities of the user's browser. This is done by looking up + the browser's information in the browscap.ini + file. + + + By default, the value of HTTP User-Agent header is + used; however, you can alter this (i.e., look up another browser's + info) by passing the optional user_agent parameter to + get_browser. You can bypass user_agent + parameter with &null; value. + + + The information is returned in an object, which will contain + various data elements representing, for instance, the browser's + major and minor version numbers and ID string; &true;/&false; values + for features such as frames, JavaScript, and cookies; and so + forth. + + + As of PHP 4.3.2, if the optional parameter + return_array is &true;, this function will return an + array instead of an object. + + + + Listing all information about the users browser + ]]> - - &example.outputs.similar; - + + &example.outputs.similar; + 1 [tables] => 1 [cookies] => 1 - [backgroundsounds] => - [vbscript] => + [backgroundsounds] => + [vbscript] => [javascript] => 1 [javaapplets] => 1 - [activexcontrols] => - [cdf] => - [aol] => + [activexcontrols] => + [cdf] => + [aol] => [beta] => 1 - [win16] => - [crawler] => - [stripper] => - [wap] => - [netclr] => + [win16] => + [crawler] => + [stripper] => + [wap] => + [netclr] => ) ]]> - - - - - The cookies value simply means that the browser - itself is capable of accepting cookies and does not mean the user has - enabled the browser to accept cookies or not. The only way to test if - cookies are accepted is to set one with setcookie, - reload, and check for the value. - - - - In order for this to work, your browscap - configuration setting in &php.ini; must point to the correct location of the - browscap.ini file on your system. - - - browscap.ini is not bundled with PHP, but you - may find an up-to-date php_browscap.ini - file here. - - - While browscap.ini contains information on - many browsers, it relies on user updates to keep the database - current. The format of the file is fairly self-explanatory. - - - - + + + + + The cookies value simply means that the browser + itself is capable of accepting cookies and does not mean the user has + enabled the browser to accept cookies or not. The only way to test if + cookies are accepted is to set one with setcookie, + reload, and check for the value. + + + + In order for this to work, your browscap + configuration setting in &php.ini; must point to the correct location of the + browscap.ini file on your system. + + + browscap.ini is not bundled with PHP, but you + may find an up-to-date php_browscap.ini + file here. + + + While browscap.ini contains information on + many browsers, it relies on user updates to keep the database + current. The format of the file is fairly self-explanatory. + + + + + - - - highlight_file - Syntax highlighting of a file - - - Description - - mixedhighlight_file - stringfilename - boolreturn - - - The highlight_file function prints out a syntax - highlighted version of the code contained in filename - using the colors defined in the built-in syntax highlighter for PHP. - - - If the second parameter return is set to &true; - then highlight_file will return the highlighted - code as a string instead of printing it out. If the second parameter is - not set to &true; then highlight_file will - return &true; on success, &false; on failure. - - ¬e.uses-ob; - - - The return parameter became available in PHP - 4.2.0. Before this time it behaved like the default, which is &false; - - - - - Since PHP 4.2.1 this function is also affected by safe_mode and open_basedir. - - - - - Care should be taken when using the - highlight_file function to make sure that - you do not inadvertently reveal sensitive information such as - passwords or any other type of information that might create a - potential security risk. - - - - Many servers are configured to automatically highlight files - with a phps extension. For example, - example.phps when viewed will show the - syntax highlighted source of the file. To enable this, add this - line to the &httpd.conf;: - - + + + highlight_file + Syntax highlighting of a file + + + Description + + mixedhighlight_file + stringfilename + boolreturn + + + The highlight_file function prints out a syntax + highlighted version of the code contained in filename + using the colors defined in the built-in syntax highlighter for PHP. + + + If the second parameter return is set to &true; + then highlight_file will return the highlighted + code as a string instead of printing it out. If the second parameter is + not set to &true; then highlight_file will + return &true; on success, &false; on failure. + + ¬e.uses-ob; + + + The return parameter became available in PHP + 4.2.0. Before this time it behaved like the default, which is &false; + + + + + Since PHP 4.2.1 this function is also affected by safe_mode and open_basedir. + + + + + Care should be taken when using the + highlight_file function to make sure that + you do not inadvertently reveal sensitive information such as + passwords or any other type of information that might create a + potential security risk. + + + + Many servers are configured to automatically highlight files + with a phps extension. For example, + example.phps when viewed will show the + syntax highlighted source of the file. To enable this, add this + line to the &httpd.conf;: + + - - - See also highlight_string. - - - + + + See also highlight_string. + + + + - - - highlight_string - Syntax highlighting of a string - - - Description - - mixedhighlight_string - stringstr - boolreturn - - - The highlight_string function outputs a syntax - highlighted version of str using the colors defined - in the built-in syntax highlighter for PHP. - - - If the second parameter return is set to &true; - then highlight_string will return the highlighted - code as a string instead of printing it out. If the second parameter is - not set to &true; then highlight_string will - return &true; on success, &false; on failure. - - ¬e.uses-ob; - - - <function>highlight_string</function> example - + + + highlight_string + Syntax highlighting of a string + + + Description + + mixedhighlight_string + stringstr + boolreturn + + + The highlight_string function outputs a syntax + highlighted version of str using the colors defined + in the built-in syntax highlighter for PHP. + + + If the second parameter return is set to &true; + then highlight_string will return the highlighted + code as a string instead of printing it out. If the second parameter is + not set to &true; then highlight_string will + return &true; on success, &false; on failure. + + ¬e.uses-ob; + + + <function>highlight_string</function> example + '); ?> ]]> - - - The above example will output (in PHP 4): - - + + + The above example will output (in PHP 4): + + <?php phpinfo(); ?> ]]> - - - The above example will output (in PHP 5): - - + + + The above example will output (in PHP 5): + + <?php phpinfo(); ?> ]]> - - - - - - The return parameter became available in PHP - 4.2.0. Before this time it behaved like the default, which is &false; - - - - See also highlight_file. - - - + + + + + + The return parameter became available in PHP + 4.2.0. Before this time it behaved like the default, which is &false; + + + + See also highlight_file. + + + + - - - ignore_user_abort - - Set whether a client disconnect should abort script execution - - - - Description - - intignore_user_abort - boolsetting - - - This function sets whether a client disconnect should cause a - script to be aborted. It will return the previous setting and - can be called without an argument to not change the current - setting and only return the current setting. See the Connection Handling - section in the Features chapter - for a complete description of connection handling in PHP. - - - See also connection_aborted, and - connection_status. - - - + + + ignore_user_abort + Set whether a client disconnect should abort script execution + + + Description + + intignore_user_abort + boolsetting + + + This function sets whether a client disconnect should cause a + script to be aborted. It will return the previous setting and + can be called without an argument to not change the current + setting and only return the current setting. See the Connection Handling + section in the Features chapter + for a complete description of connection handling in PHP. + + + See also connection_aborted, and + connection_status. + + + + - - - pack - Pack data into binary string - - - Description - - stringpack - stringformat - mixedargs - mixed... - - - Pack given arguments into binary string according to - format. Returns binary string containing - data. - - - The idea to this function was taken from Perl and all formatting - codes work the same as there, however, there are some formatting - codes that are missing such as Perl's "u" format code. The format - string consists of format codes followed by an optional repeater - argument. The repeater argument can be either an integer value or - * for repeating to the end of the input data. For a, A, h, H the - repeat count specifies how many characters of one data argument - are taken, for @ it is the absolute position where to put the - next data, for everything else the repeat count specifies how - many data arguments are consumed and packed into the resulting - binary string. Currently implemented are - - - - <function>pack</function> format characters - - - - Code - Description - - - - aNUL-padded string - ASPACE-padded string - hHex string, low nibble first - HHex string, high nibble first - csigned char - Cunsigned char - ssigned short (always 16 bit, machine byte order) - Sunsigned short (always 16 bit, machine byte order) - nunsigned short (always 16 bit, big endian byte order) - vunsigned short (always 16 bit, little endian byte order) - isigned integer (machine dependent size and byte order) - Iunsigned integer (machine dependent size and byte order) - lsigned long (always 32 bit, machine byte order) - Lunsigned long (always 32 bit, machine byte order) - Nunsigned long (always 32 bit, big endian byte order) - Vunsigned long (always 32 bit, little endian byte order) - ffloat (machine dependent size and representation) - ddouble (machine dependent size and representation) - xNUL byte - XBack up one byte - @NUL-fill to absolute position - - -
-
- - - <function>pack</function> example - + + + pack + Pack data into binary string + + + Description + + stringpack + stringformat + mixedargs + mixed... + + + Pack given arguments into binary string according to + format. Returns binary string containing + data. + + + The idea to this function was taken from Perl and all formatting + codes work the same as there, however, there are some formatting + codes that are missing such as Perl's "u" format code. The format + string consists of format codes followed by an optional repeater + argument. The repeater argument can be either an integer value or + * for repeating to the end of the input data. For a, A, h, H the + repeat count specifies how many characters of one data argument + are taken, for @ it is the absolute position where to put the + next data, for everything else the repeat count specifies how + many data arguments are consumed and packed into the resulting + binary string. Currently implemented are + + + + <function>pack</function> format characters + + + + Code + Description + + + + aNUL-padded string + ASPACE-padded string + hHex string, low nibble first + HHex string, high nibble first + csigned char + Cunsigned char + ssigned short (always 16 bit, machine byte order) + Sunsigned short (always 16 bit, machine byte order) + nunsigned short (always 16 bit, big endian byte order) + vunsigned short (always 16 bit, little endian byte order) + isigned integer (machine dependent size and byte order) + Iunsigned integer (machine dependent size and byte order) + lsigned long (always 32 bit, machine byte order) + Lunsigned long (always 32 bit, machine byte order) + Nunsigned long (always 32 bit, big endian byte order) + Vunsigned long (always 32 bit, little endian byte order) + ffloat (machine dependent size and representation) + ddouble (machine dependent size and representation) + xNUL byte + XBack up one byte + @NUL-fill to absolute position + + +
+
+ + + <function>pack</function> example + ]]> - - - The resulting binary string will be 6 bytes long and contain - the byte sequence 0x12, 0x34, 0x78, 0x56, 0x41, 0x42. - - - +
- Note that the distinction between signed and unsigned values only - affects the function unpack, where as - function pack gives the same result for - signed and unsigned format codes. + The resulting binary string will be 6 bytes long and contain + the byte sequence 0x12, 0x34, 0x78, 0x56, 0x41, 0x42. - - Also note that PHP internally stores integer values as - signed values of a machine dependent size. If you give it an unsigned - integer value too large to be stored that way it is converted to a - float which often yields an undesired result. - - - See also - unpack. - -
-
+ + + + Note that the distinction between signed and unsigned values only + affects the function unpack, where as + function pack gives the same result for + signed and unsigned format codes. + + + Also note that PHP internally stores integer values as + signed values of a machine dependent size. If you give it an unsigned + integer value too large to be stored that way it is converted to a + float which often yields an undesired result. + + + See also + unpack. + + + + + php_strip_whitespace - - Return source with stripped comments and whitespace - + Return source with stripped comments and whitespace &reftitle.description; diff --git a/reference/misc/functions/sleep.xml b/reference/misc/functions/sleep.xml index e3949ceec0..270b03e6f3 100644 --- a/reference/misc/functions/sleep.xml +++ b/reference/misc/functions/sleep.xml @@ -1,25 +1,25 @@ - + - - - sleep - Delay execution - - - Description - - intsleep - intseconds - - - The sleep function delays program execution for the - given number of seconds. - - - - <function>sleep</function> example - + + + sleep + Delay execution + + + Description + + intsleep + intseconds + + + The sleep function delays program execution for the + given number of seconds. + + + + <function>sleep</function> example + ]]> - - - This example will output (after 10 seconds) - - + + + This example will output (after 10 seconds) + + - - - - - See also usleep and - set_time_limit - - - + + + + + See also usleep and + set_time_limit + + + + time_nanosleep - - Delay for a number of seconds and nanoseconds - + Delay for a number of seconds and nanoseconds &reftitle.description; diff --git a/reference/misc/functions/uniqid.xml b/reference/misc/functions/uniqid.xml index ecdbd26e60..9fb9d625a0 100644 --- a/reference/misc/functions/uniqid.xml +++ b/reference/misc/functions/uniqid.xml @@ -1,51 +1,51 @@ - + - - - uniqid - Generate a unique ID - - - Description - - stringuniqid - stringprefix - boolmore_entropy - - - uniqid returns a prefixed unique identifier - based on the current time in microseconds. prefix - became optional in PHP 5 but can be useful, for instance, if you generate identifiers - simultaneously on several hosts that might happen to generate the - identifier at the same microsecond. Up until PHP 4.3.1, - prefix could only be a maximum of 114 - characters long. - - - If the optional more_entropy parameter is - &true;, uniqid will add additional entropy (using - the combined linear congruential generator) at the end of the return - value, which should make the results more unique. - - - With an empty prefix, the returned string - will be 13 characters long. If more_entropy is - &true;, it will be 23 characters. - - - - The prefix parameter is required before PHP 5. - - - - If you need a unique identifier or token and you intend to give - out that token to the user via the network (i.e. session cookies), - it is recommended that you use something along these lines: - - - - + + + uniqid + Generate a unique ID + + + Description + + stringuniqid + stringprefix + boolmore_entropy + + + uniqid returns a prefixed unique identifier + based on the current time in microseconds. prefix + became optional in PHP 5 but can be useful, for instance, if you generate identifiers + simultaneously on several hosts that might happen to generate the + identifier at the same microsecond. Up until PHP 4.3.1, + prefix could only be a maximum of 114 + characters long. + + + If the optional more_entropy parameter is + &true;, uniqid will add additional entropy (using + the combined linear congruential generator) at the end of the return + value, which should make the results more unique. + + + With an empty prefix, the returned string + will be 13 characters long. If more_entropy is + &true;, it will be 23 characters. + + + + The prefix parameter is required before PHP 5. + + + + If you need a unique identifier or token and you intend to give + out that token to the user via the network (i.e. session cookies), + it is recommended that you use something along these lines: + + + + ]]> - - - - - This will create a 32 character identifier (a 128 bit hex number) - that is extremely difficult to predict. - - - + + + + + This will create a 32 character identifier (a 128 bit hex number) + that is extremely difficult to predict. + + + + - - - unpack - Unpack data from binary string - - - Description - - arrayunpack - stringformat - stringdata - - - unpack from binary string into array - according to format. Returns array - containing unpacked elements of binary string. - - - unpack works slightly different from Perl as - the unpacked data is stored in an associative array. To - accomplish this you have to name the different format codes and - separate them by a slash /. - - <function>unpack</function> example - + + + unpack + Unpack data from binary string + + + Description + + arrayunpack + stringformat + stringdata + + + unpack from binary string into array + according to format. Returns array + containing unpacked elements of binary string. + + + unpack works slightly different from Perl as + the unpacked data is stored in an associative array. To + accomplish this you have to name the different format codes and + separate them by a slash /. + + <function>unpack</function> example + ]]> - - - The resulting array will contain the entries "chars1", - "chars2" and "int". - - - - - - Note that PHP internally stores integral values as signed. If you - unpack a large unsigned long and it is of the same size as PHP - internally stored values the result will be a negative number - even though unsigned unpacking was specified. - - + - See also pack for an explanation of the format - codes. + The resulting array will contain the entries "chars1", + "chars2" and "int". - - + + + + + Note that PHP internally stores integral values as signed. If you + unpack a large unsigned long and it is of the same size as PHP + internally stored values the result will be a negative number + even though unsigned unpacking was specified. + + + + See also pack for an explanation of the format + codes. + + + + - - - usleep - Delay execution in microseconds - - - Description - - voidusleep - intmicro_seconds - - - The usleep function delays program execution - for the given number of micro_seconds. A - microsecond is one millionth of a second. - - - - <function>usleep</function> example - + + + usleep + Delay execution in microseconds + + + Description + + voidusleep + intmicro_seconds + + + The usleep function delays program execution + for the given number of micro_seconds. A + microsecond is one millionth of a second. + + + + <function>usleep</function> example + ]]> - - - This script will output : - - + + + This script will output : + + - - - - - - This function did not work on Windows systems until PHP 5.0.0 - - - - See also sleep and - set_time_limit. - - - + + + + + + This function did not work on Windows systems until PHP 5.0.0 + + + + See also sleep and + set_time_limit. + + + + - - - xdiff_file_diff_binary - - Make binary diff of two files - - - - Description - - boolxdiff_file_diff_binary - stringfile1 - stringfile2 - stringdest - + + + xdiff_file_diff_binary + Make binary diff of two files + + + Description + + boolxdiff_file_diff_binary + stringfile1 + stringfile2 + stringdest + + + xdiff_file_diff_binary makes binary diff of files + file1 and file2 and stores + result in file dest. This function works with both text + and binary files. Resulting file is in binary format. + + + + Both files will be loaded into memory so ensure that your memory_limit is set high enough. + + + + &return.success; + + + + <function>xdiff_file_diff_binary</function> example - xdiff_file_diff_binary makes binary diff of files - file1 and file2 and stores - result in file dest. This function works with both text - and binary files. Resulting file is in binary format. + The following code makes binary diff of two archives. - - - Both files will be loaded into memory so ensure that your memory_limit is set high enough. - - - - &return.success; - - - <function>xdiff_file_diff_binary</function> example - - The following code makes binary diff of two archives. - - + ]]> - - - - See also xdiff_string_diff_binary. - - - + + + + + See also xdiff_string_diff_binary. + + + + - - - xdiff_file_diff - - Make unified diff of two files - - - - Description - - boolxdiff_file_diff - stringfile1 - stringfile2 - stringdest - intcontext - boolminimal - + + + xdiff_file_diff + Make unified diff of two files + + + Description + + boolxdiff_file_diff + stringfile1 + stringfile2 + stringdest + intcontext + boolminimal + + + xdiff_file_diff makes unified diff of files + file1 and file2 and stores + result in file dest. + context indicated how many lines of context you + want to include in diff result. Set minimal to + &true; if you want to minimalize size of diff (can take a long time). + Resulting file is human-readable. + + + + This function doesn't work well with binary files. To make diff of binary + files use xdiff_file_diff_binary. + + + + &return.success; + + + + <function>xdiff_file_diff</function> example - xdiff_file_diff makes unified diff of files - file1 and file2 and stores - result in file dest. - context indicated how many lines of context you - want to include in diff result. Set minimal to - &true; if you want to minimalize size of diff (can take a long time). - Resulting file is human-readable. + The following code makes unified diff of two php files. - - - This function doesn't work well with binary files. To make diff of binary - files use xdiff_file_diff_binary. - - - - &return.success; - - - <function>xdiff_file_diff</function> example - - The following code makes unified diff of two php files. - - + ]]> - - - - See also xdiff_string_diff. - - - + + + + + See also xdiff_string_diff. + + + + - - - xdiff_file_merge3 - - Merge 3 files into one - - - - Description - - mixedxdiff_file_merge3 - stringfile1 - stringfile2 - stringfile3 - stringdest - + + + xdiff_file_merge3 + Merge 3 files into one + + + Description + + mixedxdiff_file_merge3 + stringfile1 + stringfile2 + stringfile3 + stringdest + + + xdiff_file_merge3 merges files + file1, file2 and + file3 into one and stores result in file + dest. + + + Returns &true; if merge was successful, string with rejected chunks if + it was not or &false; if an internal error happened. + + + + <function>xdiff_file_merge3</function> example - xdiff_file_merge3 merges files - file1, file2 and - file3 into one and stores result in file - dest. + The following code merges three files into one. - - Returns &true; if merge was successful, string with rejected chunks if - it was not or &false; if an internal error happened. - - - <function>xdiff_file_merge3</function> example - - The following code merges three files into one. - - + ]]> - - - - See also xdiff_string_merge3. - - - + + + + + See also xdiff_string_merge3. + + + + - - - xdiff_file_patch_binary - - Patch a file with a binary diff - - - - Description - - boolxdiff_file_patch_binary - stringfile - stringpatch - stringdest - + + + xdiff_file_patch_binary + Patch a file with a binary diff + + + Description + + boolxdiff_file_patch_binary + stringfile + stringpatch + stringdest + + + xdiff_file_patch_binary patches file + file with binary patch in file + patch and stores result in file + dest. + + + + Both files (file and patch) will be loaded into memory so ensure that your memory_limit is set high enough. + + + + &return.success; + + + + <function>xdiff_file_patch_binary</function> example - xdiff_file_patch_binary patches file - file with binary patch in file - patch and stores result in file - dest. + The following code applies binary diff to a file. - - - Both files (file and patch) will be loaded into memory so ensure that your memory_limit is set high enough. - - - - &return.success; - - - <function>xdiff_file_patch_binary</function> example - - The following code applies binary diff to a file. - - + ]]> - - - - See also xdiff_string_patch_binary. - - - + + + + + See also xdiff_string_patch_binary. + + + + - - - xdiff_file_patch - - Patch a file with an unified diff - - - - Description - - mixedxdiff_file_patch - stringfile - stringpatch - stringdest - intflags - + + + xdiff_file_patch + Patch a file with an unified diff + + + Description + + mixedxdiff_file_patch + stringfile + stringpatch + stringdest + intflags + + + xdiff_file_patch patches file + file with unified patch in file + patch and stores result in file + dest. + + + flags can be either + XDIFF_PATCH_NORMAL (default mode, normal patch) or + XDIFF_PATCH_REVERSE (reversed patch). + + + Returns &false; if an internal error happened, string with rejected + chunks of patch or &true; if patch has been successfully applied. + + + + <function>xdiff_file_patch</function> example - xdiff_file_patch patches file - file with unified patch in file - patch and stores result in file - dest. + The following code applies unified diff to a file. - - flags can be either - XDIFF_PATCH_NORMAL (default mode, normal patch) or - XDIFF_PATCH_REVERSE (reversed patch). - - - Returns &false; if an internal error happened, string with rejected - chunks of patch or &true; if patch has been successfully applied. - - - <function>xdiff_file_patch</function> example - - The following code applies unified diff to a file. - - + ]]> - - - - Patch reversing example - - The following code reverses a patch. - - + + + + Patch reversing example + + The following code reverses a patch. + + ]]> - - - - See also xdiff_string_patch. - - - + + + + + See also xdiff_string_patch. + + + + - - - xdiff_string_diff_binary - - Make binary diff of two strings - - - - Description - - stringxdiff_string_diff_binary - stringstr1 - stringstr2 - - - xdiff_string_diff_binary makes binary diff of - strings str1 and str2. - - - Returns string with result or &false; if an internal error happened. - - - See also xdiff_file_diff_binary. - - - + + + xdiff_string_diff_binary + Make binary diff of two strings + + + Description + + stringxdiff_string_diff_binary + stringstr1 + stringstr2 + + + xdiff_string_diff_binary makes binary diff of + strings str1 and str2. + + + Returns string with result or &false; if an internal error happened. + + + See also xdiff_file_diff_binary. + + + + - - - xdiff_string_diff - - Make unified diff of two strings - - - - Description - - stringxdiff_string_diff - stringstr1 - stringstr2 - intcontext - boolminimal - + + + xdiff_string_diff + Make unified diff of two strings + + + Description + + stringxdiff_string_diff + stringstr1 + stringstr2 + intcontext + boolminimal + + + xdiff_string_diff makes unified diff of strings + str1 and str2. + context indicated how many lines of context you + want to include in diff result. Set minimal to + &true; if you want to minimalize size of diff (can take a long time). + + + + This function doesn't work well with binary strings. To make diff of binary + strings use xdiff_string_diff_binary. + + + + Returns string with result or &false; if an internal error happened. + + + + <function>xdiff_string_diff</function> example - xdiff_string_diff makes unified diff of strings - str1 and str2. - context indicated how many lines of context you - want to include in diff result. Set minimal to - &true; if you want to minimalize size of diff (can take a long time). + The following code makes unified diff of two articles. - - - This function doesn't work well with binary strings. To make diff of binary - strings use xdiff_string_diff_binary. - - - - Returns string with result or &false; if an internal error happened. - - - <function>xdiff_string_diff</function> example - - The following code makes unified diff of two articles. - - + ]]> - - - - See also xdiff_file_diff. - - - + + + + + See also xdiff_file_diff. + + + + - - - xdiff_string_merge3 - - Merge 3 strings into one - - - - Description - - mixedxdiff_string_merge3 - stringstr1 - stringstr2 - stringstr3 - stringerror - - - xdiff_string_merge3 merges strings - str1, str2 and - str3 into one. - - - If error is passed then rejected parts are stored - inside this variable. - - - Returns merged string, &false; if an internal error happened, or &true; - if merged string is empty. - - - See also xdiff_file_merge3. - - - + + + xdiff_string_merge3 + Merge 3 strings into one + + + Description + + mixedxdiff_string_merge3 + stringstr1 + stringstr2 + stringstr3 + stringerror + + + xdiff_string_merge3 merges strings + str1, str2 and + str3 into one. + + + If error is passed then rejected parts are stored + inside this variable. + + + Returns merged string, &false; if an internal error happened, or &true; + if merged string is empty. + + + See also xdiff_file_merge3. + + + + - - - xdiff_string_patch_binary - - Patch a string with a binary diff - - - - Description - - stringxdiff_string_patch_binary - stringstr - stringpatch - - - xdiff_string_patch_binary patches string - str with binary patch in string - patch. - - - Returns a patched string. - - - See also xdiff_file_patch_binary. - - - + + + xdiff_string_patch_binary + Patch a string with a binary diff + + + Description + + stringxdiff_string_patch_binary + stringstr + stringpatch + + + xdiff_string_patch_binary patches string + str with binary patch in string + patch. + + + Returns a patched string. + + + See also xdiff_file_patch_binary. + + + + - - - xdiff_string_patch - - Patch a string with an unified diff - - - - Description - - stringxdiff_string_patch - stringstr - stringpatch - intflags - stringerror - + + + xdiff_string_patch + Patch a string with an unified diff + + + Description + + stringxdiff_string_patch + stringstr + stringpatch + intflags + stringerror + + + xdiff_string_patch patches string + str with unified patch in string + patch. + + + flags can be either + XDIFF_PATCH_NORMAL (default mode, normal patch) or + XDIFF_PATCH_REVERSE (reversed patch). + + + If error is passed then rejected parts are stored + inside this variable. + + + + <function>xdiff_string_patch</function> example - xdiff_string_patch patches string - str with unified patch in string - patch. + The following code applies changes to some article. - - flags can be either - XDIFF_PATCH_NORMAL (default mode, normal patch) or - XDIFF_PATCH_REVERSE (reversed patch). - - - If error is passed then rejected parts are stored - inside this variable. - - - <function>xdiff_string_patch</function> example - - The following code applies changes to some article. - - + ]]> - - - - Returns a patched string. - - - See also xdiff_file_patch. - - - + + + + + Returns a patched string. + + + See also xdiff_file_patch. + + +