Document directory
- [PHP-manual-download]
- [PHP-manual-Chapter 1 variables]
- [PHP-manual-Chapter 15th operators]
- [PHP-manual-Chapter 19th class and object (PHP 5)]
- [PHP-manual-Chapter 20th Exception Handling]
- [PHP-manual-Chapter 21st references]
- [PHP-manual-Chapter 43rd php Command Line Mode]
- [PHP-manual-V. array functions]
- [PHP-manual-xviii. Curl, client URL library function]
- [PHP-manual-xxii. date/time function]
- [PHP-manual-XXXIII. Error Handling and logging functions error handling and log functions]
- [PHP-manual-XLVII. Function handling functions function management function]
- [PHP-manual-XC. miscellaneous functions]
- [PHP-manual-CII. network functions]
- [PHP-manual-cxxvii. PostgreSQL database functions]
- [PHP-manual-CXXX. program execution functions program call function]
- [PHP-manual-cxlix. Session session handler]
- [PHP-manual-clxi. String string handler]
- [PHP-manual-clxvi. Tidy functions-tidy function]
- [PHP-manual-clxix. url function]
- [PHP-manual-Appendix H. php. ini configuration options]
- [PHP-manual-Appendix L. reserved word list]
- [PHP-manual-Appendix Q. php type comparison table]
Php-manual-clxvii. tokenizer functions parser code function-token_get_all splits the given source code into the parser code token_get_all
(PHP 4> = 4.2.0, PHP 5)
Token_get_all-split given source into PHP tokens
Description
ArrayToken_get_all(String $ source)
Token_get_all ()Parses the givenSourceString into PHP language tokens using the Zend engine's lexical syntax.
For a list of parser tokens, see Appendix R,Parser code list, Or use token_name () to translate a token value into its string representation.
Parameters
-
Source
-
The PHP source to parse.
Return Value
An array of token identifiers. Each individual token identifier is either a single character (I. e .:;,.,>,!, Etc...), or a two element array containing the token index in element 0, and the string content of the original token in element 1.
Example
Example 2356.Token_get_all ()Examples
<?php
$tokens = token_get_all('<?php echo; ?>'); /* => array(
array(T_OPEN_TAG, '<?php'),
array(T_ECHO, 'echo'),
';',
array(T_CLOSE_TAG, '?>') ); */
/* Note in the following example that the string is parsed as T_INLINE_HTML
rather than the otherwise expected T_COMMENT (T_ML_COMMENT in PHP <5).
This is because no open/close tags were used in the "code" provided.
This would be equivalent to putting a comment outside of <?php ?> tags in a normal file. */
$tokens = token_get_all('/* comment */'); // => array(array(T_INLINE_HTML, '/* comment */'));
?>
[Token_get_all splits the given source code into the parser code-document]
Http://www.php.net/manual/zh/function.token-get-all.php
[PHP-keywords]
PHP
[PHP-related forums]
Http://php.board.newsmth.net/
Http://bbs.pku.edu.cn/, homepage watch
Http://forum.csdn.net/SList/PHP/
[PHP-download]
Appserv 2.5.9, http://www.appservnetwork.com/
Zend optimizer 3.3.0a, http://www.zend.com/products/zend_optimizer
PhpMyAdmin 2.11.2, http://www.phpmyadmin.net/home_page/index.php
Zend core 2.5.0, http://www.zend.com/products/zend_core
Zend Platform 3.0.3, http://www.zend.com/products/zend_platform
PHP 5.2.5 http://www.php.net/releases/5_2_5.php
Zend studio 5.5, http://www.zend.com/products/zend_studio
Zend Guard 5.0, http://www.zend.com/products/zend_guard
[PHP-manual]
Php-reset-point the internal pointer of the array to the first unit, http://www.php.net/manual/zh/function.reset.php
Php-serialize-generates a representation of a stored value, http://www.php.net/manual/zh/function.serialize.php
PHP: Magic constant-Manual:, http://www.php.net/manual/zh/language.constants.predefined.php
PHP: Soap functions-soap. wsdl_cache_enabled, http://cn.php.net/manual/zh/ref.soap.php#ini.soap.wsdl-cache-enabled
String to numeric, http://www.php.net/manual/zh/language.types.string.php#language.types.string.conversion
Class program action class abstract, http://www.php.net/manual/zh/language.oop5.abstract.php
Foreach traversal array, http://www.php.net/manual/zh/control-structures.foreach.php
Lost SOAP configuration options, http://bugs.php.net/bug.php? Id = 38644
Php Command Line Mode, http://www.php.net/manual/zh/features.commandline.php
Bitwise operator, http://www.php.net/manual/zh/language.operators.bitwise.php#id2665181
File_exists check whether the file or directory exists, http://www.php.net/manual/zh/function.file-exists.php
Is_file determines whether a given file name is a normal file, http://www.php.net/manual/zh/function.is-file.php
Settype sets the type of the variable, http://cn.php.net/manual/zh/function.settype.php#function.settype
Is_numeric checks whether the variable is a numeric or numeric string, http://www.php.net/manual/zh/function.is-numeric.php
Ksort sorts the array by key name, http://www.php.net/manual/zh/function.ksort.php
[PHP-manual-download]
Http://www.php.net/download-docs.php
[PHP-manual-Chapter 1 variables]
Reference of global and static variables, http://www.php.net/manual/zh/language.variables.scope.php#language.variables.scope.references
[PHP-manual-Chapter 15th operators]
Miscontrol operator, http://www.php.net/manual/zh/language.operators.errorcontrol.php
[PHP-manual-Chapter 19th class and object (PHP 5)]
Object cloning, clone, http://www.php.net/manual/zh/language.oop5.cloning.php
[PHP-manual-Chapter 20th Exception Handling]
Http://www.php.net/manual/zh/language.exceptions.php, Overview
PHP improvement process with Exception Handling
[PHP-manual-Chapter 21st references]
Return reference, http://www.php.net/manual/zh/language.references.return.php
[PHP-manual-Chapter 43rd php Command Line Mode]
Table 43.2. cli dedicated constants, http://www.php.net/manual/zh/features.commandline.php#id2715646
[PHP-manual-V. array functions]
Calculate the intersection of arrays, http://www.php.net/manual/zh/function.array-intersect.php
Array_merge combines one or more arrays, http://www.php.net/manual/zh/function.array-merge.php
[PHP-manual-xviii. Curl, client URL library function]
Http://www.php.net/manual/zh/ref.curl.php, Overview
Curl_setopt sets curl transfer options, http://www.php.net/manual/zh/function.curl-setopt.php
[PHP-manual-xxii. date/time function]
Date Format a local time/date, http://www.php.net/manual/zh/function.date.php
[PHP-manual-XXXIII. Error Handling and logging functions error handling and log functions]
Http://www.php.net/manual/zh/ref.errorfunc.php, Overview
[PHP-manual-XLVII. Function handling functions function management function]
Register_shutdown_function registers a function called at the end of a script, http://www.php.net/manual/zh/function.register-shutdown-function.php
[PHP-manual-XC. miscellaneous functions]
Sleep delayed execution, http://www.php.net/manual/zh/ref.misc.php
Uniqid generation unique ID, http://www.php.net/manual/zh/function.uniqid.php
[PHP-manual-XCVIII. MySQL functions]
Mysql_real_escape_string escape special characters in the string used in the SQL statement, and take into account the current character set connected, http://www.php.net/manual/zh/function.mysql-real-escape-string.php
[PHP-manual-CII. network functions]
Setcookie sends a cookie, http://www.php.net/manual/zh/function.setcookie.php
[PHP-manual-cxxvii. PostgreSQL database functions]
Pg_insert insert array into table, http://www.php.net/manual/zh/index.php
[PHP-manual-CXXX. program execution functions program call function]
Proc_open execute the command and open the file pointer for input and output, http://www.php.net/manual/zh/function.proc-open.php
[PHP-manual-cxlix. Session session handler]
Session. save_path defines the parameters passed to the storage processor, http://www.php.net/manual/zh/ref.session.php#ini.session.save-path
Session. use_only_cookies specify whether to use cookies only on the client to store session ID, http://www.php.net/manual/zh/ref.session.php#ini.session.use-only-cookies
[PHP-manual-clxi. String string handler]
Str_pad uses another string to populate a string with a specified length, http://www.php.net/manual/zh/function.str-pad.php
Strpos looks for the location where a string first appears, http://www.php.net/manual/zh/function.strpos.php
Substr returns part of the string, http://www.php.net/manual/zh/function.substr.php
[PHP-manual-clxvi. Tidy functions-tidy function]
Http://www.php.net/manual/zh/ref.tidy.php, Overview
[PHP-manual-clxvii. tokenizer Functions
Parser code function]
Token_get_all splits the given source code into parser code, http://www.php.net/manual/zh/function.token-get-all.php
[PHP-manual-clxix. url function]
Http://www.php.net/manual/zh/ref.url.php, Overview
[PHP-manual-Appendix H. php. ini configuration options]
Register_globals determines whether to register egpcs (environment, get, post, Cookie, server) variables as global variables, http://www.php.net/manual/zh/ini.core.php#ini.register-globals
Short_open_tag determines whether to allow the use of PHP code to start the abbreviated form of the flag, http://www.php.net/manual/zh/ini.core.php#ini.short-open-tag
[PHP-manual-Appendix L. reserved word list]
Server variables: $ _ server, http://www.php.net/manual/zh/reserved.variables.php#reserved.variables.server
[PHP-manual-Appendix Q. php type comparison table]
Table Q.2. loose comparison with =, http://www.php.net/manual/zh/types.comparisons.php#id9240444
[PHP-application instance]
Syntax coloring: php.exe-s "% 1"> "cmd1.html"
Remove sub-objects from simplexml objects