PHP functions (4)

Source: Internet
Author: User

Chapter 2 XML parsing functions 25th
25.1 Syntax Parsing functions in PHP 453
25.1.1 utf8_decode function: converts a UTF-8 string encoded in ISO-8859-1 to a single-byte ISO-8859-1 string 453
25.1.2 utf8_encode function: converts a ISO-8859-1-encoded string to a UTF-8-encoded 454
25.1.3 xml_error_string function: gets the error string 454 of the XML Parser
25.1.4 xml_get_current_byte_index function: Get the Current byte index of the XML Parser 455
25.1.5 xml_get_current_column_number function: gets the current column number 455 of the XML parser.
25.1.6 xml_get_current_line_number function: Get the current row number of the XML Parser 456
25.1.7 xml_get_error_code function: Error in retrieving XML Parser Code 456
25.1.8 xml_parse_into_struct function: parses XML data to the array. 457
25.1.9 xml_parse function: Start parsing an XML document 458
25.1.10 xml_parser_create_ns function: generate an XML Parser 458 that supports namespaces
25.1.11 xml_parser_create function: Create an XML Parser 459
25.1.12 xml_parser_free function: Release the specified XML Parser 459
25.1.13 xml_parser_get_option function: Get the option setting information 460 from the XML Parser
25.1.14 xml_parser_set_option function: Set the 460 option for the specified XML Parser
25.1.15 xml_set_character_data_handler function: create a character data processor 461
25.1.16 xml_set_default_handler function: Creates the default processor 461
25.1.17 xml_set_element_handler function: Creates the starting and ending element processor 462.
25.1.18 xml_set_end_namespace_decl_handler function: creates an end namespace claim processor 464.
25.1.19 xml_set_external_entity_ref_handler function: creates an external entity pointing to processor 464
25.1.20 xml_set_notation_decl_handler function: creates an annotation declaration processor 465
25.1.21 xml_set_object function: Use the XML Parser 466 in the object
25.1.22 xml_set_processing_instruction_handler function: Create a processing instruction processor 467
25.1.23 xml_set_start_namespace_decl_handler function: Create the starting namespace declaration processor 468
25.1.24 xml_set_unparsed_entity_decl_handler function: Creates the unresolved entity definition declaration processor 468
25.2 conclusion 469
Chapter 2 XMLRPC functions 26th
26.1 XMLRPC function 470 in PHP
26.1.1 xmlrpc_decode_request function: decodes XML into 470 of PHP type
26.1.2 xmlrpc_decode function: decodes XML into 471 of the PHP type.
26.1.3 xmlrpc_encode_request function: generate xml 471 for PHP values
26.1.4 xmlrpc_encode function: generate xml 472 for PHP values
26.1.5 xmlrpc_get_type function: Type 472 for retrieving XMLRPC for PHP values
26.1.6 xmlrpc_is_fault function: Check whether XMLRPC has an error 473
26.1.7 xmlrpc_parse_method_descriptions function: decodes XML into the list of method descriptions 474
26.1.8 xmlrpc_server_add_introspection_data function: 474
26.1.9 xmlrpc_server_call_method function: parses XML requests and calls method 475 at the same time.
26.1.10 xmlrpc_server_create function: Create an XMLRPC server 475
26.1.11 xmlrpc_server_destroy function: Destroy server resource 476
26.1.12 xmlrpc_server_register_introspection_callback function: register a PHP function to generate document 476
26.1.13 xmlrpc_server_register_method function: registers a PHP function to match the XMLRPC method name 477.
26.1.14 xmlrpc_set_type function: sets the XMLRPC type 478 for a PHP string value.
26.2 Conclusion 479
9th Comprehensive Functions
Chapter 2 errors and logging functions 27th
27.1 errors and logging functions in PHP 483
27.1.1 debug_backtrace function: generate a backtrace 483
27.1.2 debug_print_backtrace function: outputs a PHP backtrace 484
27.1.3 error_log function: sends an error message to the specified location 484
27.1.4 error_reporting function: Set PHP error report level 485
27.1.5 restore_error_handler function: Restore error message pointer 486
27.1.6 restore_exception_handler function: restores the pre-defined exception pointer 487.
27.1.7 set_error_handler function: sets a user-defined error message function 487.
27.1.8 set_exception_handler function: Set a user-defined exception handle function 489
27.1.9 trigger_error function: generate a user-level error, warning, or note 489
27.2 conclusion 490
Chapter 2 math functions 28th
28.1 mathematical computing functions 491
28.1.1 ABS function: returns the absolute value of 491.
28.1.2 Ceil function: returns an integer of 492.
28.1.3 floor function: rounds 492
28.1.4 fmod function: returns the remainder of the Floating Point Number of the Division 492.
28.1.5 log10 function: returns the base-10 logarithm of 493.
28.1.6 log1p function: Return log (1 + number) 494
28.1.7 log function: returns the (natural) logarithm of the specified value 494.
28.1.8 POW function: returns the nth power 495 of the specified value.
28.1.9 round: round the floating point number to 495
28.1.10 SQRT function: returns the square root of the specified value 496
28.2 mathematical trigonometric functions 496
28.2.1 ACOs function: returns the arc cosine of 497.
28.2.2 acossh function: returns the hyperbolic cosine of 497.
28.2.3 asin function: returns the arc sine of 497.
28.2.4 asinh function: returns the hyperbolic sine of 498.
28.2.5 atan2 function: Calculate the arc tangent of two parameters by 498
28.2.6 atan function: returns the tangent of 499.
28.2.7 atanh function: returns the hyperbolic tangent of 499.
28.2.8 cos function: returns the cosine 499.
28.2.9 cosh function: returns the hyperbolic cosine of 500.
28.2.10 sin function: returns the sine 500.
28.2.11 Sinh function: returns the hyperbolic sine 501.
28.2.12 tan function: returns the tangent of 501
28.2.13 tanh function: returns the hyperbolic tangent of 501.
28.3 evaluate the maximum function 502
28.3.1 getrandmax function: displays the maximum possible value of a random number of 502
28.3.2 Max function: Find the maximum value of 502
28.3.3 min function: Find the minimum value of 503
28.3.4 mt_getrandmax function: display the maximum possible value of a random number of 504
28.4 hexadecimal conversion function 504
28.4.1 base_convert function: Convert the number 505 from any hexadecimal notation
28.4.2 bindec function: Convert binary to decimal 505
28.4.3 decbin function: Convert decimal to binary 506
28.4.4 dechex function: converts decimal to hexadecimal 506
28.4.5 decoct function: Convert decimal to octal 507
28.4.6 hexdec function: Convert hexadecimal to decimal 507
28.4.7 dec function: Convert octal to decimal 507
28.5 other mathematical functions 508
28.5.1 deg 2rad function: converts degrees to radians 508
28.5.2 exp function: Calculate the e index 508
28.5.3 expm1 function: returns exp (number)-1 509
28.5.4 hypot function: Calculate the oblique side length of a right triangle by 509
28.5.5 is_finite function: determines if it is a finite value of 510
28.5.6 is_infinite function: determines if it is an infinite value of 510
28.5.7 is_nan function: judge whether it is a valid value of 511
28.5.8 lcg_value function: Combined linear coequal generator 511
28.5.9 mt_rand function: generate a better Random Number of 512
28.5.10 mt_srand function: play a better random number generator seed 512
28.5.11 PI function: Get the circumference rate value 513
28.5.12 rad2deg function: converts the number of radians to the corresponding number of degrees 513
28.5.13 rand function: generates a random integer of 514.
28.5.14 srand function: broadcast the random number generator seed 514.
28.6 conclusion 515
Chapter 2 output control functions 29th
29.1 PHP Output Control Function 516
29.1.1 flush function: refresh the output buffer 516
29.1.2 ob_clean function: clears the output buffer 517
29.1.3 ob_end_clean function: clears the buffer and closes the ongoing output buffer 518
29.1.4 ob_end_flush function: sends buffer data and disables buffer 518.
29.1.5 ob_flush function: Send buffer data 519
29.1.6 ob_get_clean function: gets the buffer content and ends the buffer 519
29.1.7 ob_get_contents function: Get the buffer data 520
29.1.8 ob_get_flush function: refreshes the buffer data, returns the data, and disables the buffer 520.
29.1.9 ob_get_length function: Get the buffer length of 521
29.1.10 ob_get_level function: Get the buffer level 522
29.1.11 ob_get_status function: Get the buffer status 522
29.1.12 ob_gzhandler function: the callback function used by ob_start to compress the output buffer 523.
29.1.13 ob_implicit_flush function: enable or disable the original output buffer 524
29.1.14 ob_list_handlers function: list all output handles used 525
29.1.15 ob_start function: Open buffer 525
29.1.16 output_add_rewrite_var function: Add a URL rewrite value of 526.
29.1.17 output_reset_rewrite_vars function: resets the URL rewrite value by 526.
29.2 conclusion 527
Chapter 2 PHP options/INFO functions 30th
30.1 PHP Information Retrieval Class Functions 528
30.1.1 assert function: Check whether the assertion declaration is incorrect. 528
30.1.2 extension_loaded function: Check whether PHP extensions load 529
30.1.3 get_cfg_var function: gets the value of the PHP configuration option 529
30.1.4 get_current_user function: get the name of the owner of the current PHP script 530
30.1.5 get_defined_constants function: returns an array of 531 containing PHP predefined constants.
30.1.6 get_extension_funcs function: returns an array of 532 containing the names of all functions in the specified Module
30.1.7 get_include_path function: returns the information of the path contained in the current configuration file 534
30.1.8 get_included_files function: returns an array 534 about file inclusion information.
30.1.9 get_loaded_extensions function: returns an array of 535 containing information about all load modules.
30.1.10 get_magic_quotes_gpc function: Get magic_quotes_gpc status information 536
30.1.11 get_magic_quotes_runtime function: gets the status information of magic_quotes _ runtime 537
30.1.12 get_required_files function: returns an array 537 about file inclusion information
30.1.13 getenv function: Get the PHP environment variable value 538
30.1.14 getlastmod function: Get the last modification time of the current PHP page file: 539
30.1.15 getmygid function: Get the GID Number of the current PHP script page owner 539
30.1.16 getmyinode function: Get the inode number 540 on the current PHP script page
30.1.17 getmypid function: Get php pid 541
30.1.18 getmyuid function: Get the UID Number of the PHP script page owner 541
30.1.19 getopt function: Get setting 542 from the command line parameter list
30.1.20 getrusage function: Get the current resource syntax 542
30.1.21 ini_get_all function: Get all configuration options 543
30.1.22 ini_get function: gets the value of the configuration option 544
30.1.23 memory_get_usage function: returns 544 of the memory occupied by the PHP script.
30.1.24 php_ini_scanned_files function: returns the configuration file list 545 in the configuration file directory.
30.1.25 php_logo_guid function: Get the guid 546 of the logo image.
30.1.26 php_sapi_name function: gets the interface type 546 between PHP and Web Server
30.1.27 php_uname function: Obtain the operating system information of the PHP script running 547
30.1.28 phpcredits function: print the credits list 548
30.1.29 phpinfo function: Output PHP information 549
30.1.30 phpversion function: Get PHP 550
30.1.31 zend_logo_guid function: gets the guid 550 of the Zend logo image.
30.1.32 zend_version function: Get Zend engine version 551
30.2 PHP configuration class functions 551
30.2.1 assert_options function: set or obtain different declaration mark 551
30.2.2 ini_alter function: set the value of the PHP configuration option to 552.
30.2.3 ini_restore function: the value of the restore configuration option is 564.
30.2.4 ini_set function: set the value of the PHP configuration option to 565.
30.2.5 putenv function: Set the environment variable 565
30.2.6 restore_include_path function: recovery file contains path configuration information 566
30.2.7 set_include_path function: Set file inclusion path configuration option 566
30.2.8 set_magic_quotes_runtime function: Set magic_quotes runtime to 567
30.2.9 set_time_limit function: sets the maximum execution time to 567.
30.3 other functions 568
30.3.1 DL function: Load PHP extension module 568
30.3.2 main function: it is only a named main () function 568.
30.3.3 version_compare function: compare two PHP versions with a value of 569
30.4 conclusion 570
Chapter 2 program execution function 31st
In PHP 31.1 Program Execute function 571
31.1.1 escapeshellarg function: filter the string 571 used as the command parameter.
31.1.2 escapeshellcmd function: filter special characters 571 in strings used as commands
31.1.3 exec function: Execute Command 572
31.1.4 passthru function: executes the program but does not output 573 data
31.1.5 proc_close function: closes a process opened by the proc_open () function and returns the exit of the process.
Code 574:
31.1.6 proc_get_status function: Get Process status information 574
31.1.7 proc_nice function: change the priority of the current process by 575
31.1.8 proc_open function: Execute the command and open the input/output file pointer 576
31.1.9 proc_terminate function: Kill process 577
31.1.10 shell_exec function: Execute the command and return the complete output result as a string 578
31.1.11 system function: Execute the program and output result 578.
31.2 conclusion 579
Chapter 2 date/time functions 32nd
32.1 Date and Time Functions in PHP 580
32.1.1 checkdate function: Verify a greaguri date 580
32.1.2 date_default_timezone_get function: obtains the Default Time Zone 581 used by all date and time functions in a script.
32.1.3 date_default_timezone_set function: sets the Default Time Zone 582 for all date and time functions in a script
32.1.4 date_sunrise function: returns the sunrise time of the given date and place at 582.
32.1.5 date_sunset function: returns the Sunset Time 583 of the given date and location.
32.1.6 date function: format a local time/date 583
32.1.7 getdate function: Get date/time information 586
32.1.8 gettimeofday function: Get the current time 587
32.1.9 gmdate function: format a gmt/UTC date/time 588
32.1.10 gmmktime function: obtains the Unix timestamp 588 of the GMT date.
32.1.11 gmstrftime function: Format GMT/UTC time/date 589 according to region settings
32.1.12 idate function: format the local time and date as an integer of 589
32.1.13 localtime function: Get local time 590
32.1.14 microtime function: returns the current UNIX Timestamp and 591 microseconds.
32.1.15 mktime function: obtains the Unix timestamp 592 of a date.
32.1.16 strftime function: Format local time/date 593 according to region settings
32.1.17 strptime function: parses the date/time 595 generated by strftime
32.1.18 strtotime function: parses the date and time descriptions of any English text into UNIX timestamp 595
32.1.19 time function: returns the current UNIX timestamp 596
32.2 conclusion 597
Chapter 2 classes/objects functions 33rd
33.1 PHP class/object function 598
33.1.1 class_exists function: Check whether the class has been defined as 598
33.1.2 get_class_methods function: returns the array 599 consisting of class method names.
33.1.3 get_class_vars function: returns the array 600 consisting of the default attributes of the class.
33.1.4 get_class function: Class Name 601 of the returned object
33.1.5 get_declared_classes function: returns the array 602 consisting of the names of the defined classes.
33.1.6 get_declared_interfaces function: returns the array 604 of a declared interface.
33.1.7 get_object_vars function: returns the associated array 604 composed of object attributes.
33.1.8 get_parent_class function: returns the parent class name 605 of the object or class.
33.1.9 interface_exists function: Check whether the interface defines 606
33.1.10 is_a function: judge whether an object belongs to a class 607
33.1.11 is_subclass_of function: judge whether the object belongs to a subclass of A Class 607
33.1.12 method_exists function: Check whether the class methods exist 608
33.1.13 property_exists function: Check whether the object or class has the specified attribute 609
33.2 conclusion 610
Chapter 2 COM functions 34th
34.1 COM and. NET functions in PHP 611
34.1.1 com function: COM class constructor, which provides the framework 611 for integrating (d) COM components into PHP scripts
34.1.2 DOTNET function: Creates a class from the. NET set and calls the class method. The class attribute 612 is used.
34.1.3 variant function: encapsulate variables into a simple container 613 In the Variant Structure
34.1.4 com_create_guid function: generates a globally unique identifier (guid) 613
34.1.5 com_event_sink function: establish a connection between the COM object and the PHP Object 614
34.1.6 com_get_active_object function: returns the handle 615 of a running com class instance.
34.1.7 com_invoke function: Method 615 for calling COM components
34.1.8 com_isenum function: Get An ienumvariant 616
34.1.9 com_load_typelib function: load a typelib 616
34.1.10 com_load function: create reference 617 for the new COM Component
34.1.11 com_message_pump function: stops running at the specified time, waiting for information to arrive at 617
34.1.12 com_print_typeinfo function: outputs a PHP class 617 defined as a process interface.
34.2 conclusion 618
Chapter 2 miscellaneous functions 35th
35.1 miscellaneous functions in PHP 619
35.1.1 connection_aborted function: Judge the client connection status 619
35.1.2 connection_status function: returns the client connection status 620.
35.1.3 connection_timeout function: Judge the script running status 620
35.1.4 constant function: returns the constant value 620
35.1.5 define function: defines a constant value of 621
35.1.6 defined function: judge whether a constant exists 621
35.1.7 die function: Exit program 622
35.1.8 eval function: Use a string as the PHP code to execute 622
35.1.9 exit function: exit and output information 623
35.1.10 get_browser function: Obtain the functions of the client browser 624
35.1.11 highlight_file function: displays a file with a brightness of 625
35.1.12 highlight_string function: High Brightness 626 for a string
35.1.13 ignore_user_abort function: sets whether to end PHP code 626 when the client is disconnected.
35.1.14 pack function: pack the specified data as a binary string 627
35.1.15 php_check_syntax function: Check the PHP File Syntax 628
35.1.16 php_strip_whitespace function: Remove comments and spaces in the PHP file 628
35.1.17 show_source function: displays a file with a brightness of 629
35.1.18 sleep function: Pause program 629
35.1.19 time_nanosleep function: Pause program 630
35.1.20 time_sleep_until function: Wake up program 631 at the specified time
35.1.21 uniqid function: generate a single ID 631
35.1.22 unpack function: unpack data from binary string to array 631
35.1.23 usleep function: Pause the program in microseconds 632

Post: http://hi.baidu.com/glaivelee/blog/item/c1dca82b38c963f5e7cd40c6.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.