php 오류해석기
글쓴이: 김영철
작성일: 09-01-13 12:23

부록 P. 해석기 토큰 목록

PHP 언어의 많은 부분은 내부적으로 T_SR같은 타입으로 표현된다. PHP는 해석 에러에서 이와 같은 식별자를 출력한다. 다음과 같은 형태이다. "Parse error: unexpected T_SR, expecting ',' or ';' in script.php on line 10."

위는 T_SR이 무슨 의미인지 안다고 가정한다. 그 의미를 알지못하는 모든 사람을 위해 그런 식별자,PHP-문법,매뉴얼에 위치한 적절한 레퍼런스의 테이블을 보인다.

표 P-1. 토큰

T_AND_EQUAL &= assignment operators
T_ARRAY array() array()array syntax
T_ARRAY_CAST (array) type-casting
T_AS as foreach
T_BAD_CHARACTER   anything below ASCII 32 except \t (0x09), \n (0x0a) and \r (0x0d)
T_BOOLEAN_AND && logical operators
T_BOOLEAN_OR || logical operators
T_BOOL_CAST (bool) or (boolean) type-casting
T_BREAK break break
T_CASE case switch
T_CLASS class classes and objects
T_CLOSE_TAG ?> or %>  
T_COMMENT // or # comments
T_CONCAT_EQUAL .= assignment operators
T_CONST const  
T_CONSTANT_ENCAPSED_STRING "foo" or 'bar' string syntax
T_CONTINUE continue  
T_DEC -- incrementing/decrementing operators
T_DECLARE declare declare
T_DEFAULT default switch
T_DIV_EQUAL /= assignment operators
T_DNUMBER 0.12, etc floating point numbers
T_DO do do..while
T_DOLLAR_OPEN_CURLY_BRACES ${ complex variable parsed syntax
T_DOUBLE_ARROW => array syntax
T_DOUBLE_CAST (real), (double) or (float) type-casting
T_ECHO echo echo()
T_ELSE else else
T_ELSEIF elseif elseif
T_EMPTY empty empty()
T_ENDDECLARE enddeclare declarealternative syntax
T_ENDFOR endfor foralternative syntax
T_ENDFOREACH endforeach foreachalternative syntax
T_ENDIF endif ifalternative syntax
T_ENDSWITCH endswitch switchalternative syntax
T_ENDWHILE endwhile whilealternative syntax
T_END_HEREDOC   heredoc syntax
T_EVAL eval() eval()
T_EXIT exit or die exit()die()
T_EXTENDS extends extendsclasses and objects
T_FILE __FILE__ constants
T_FOR for for
T_FOREACH foreach foreach
T_FUNCTION function or cfunction functions
T_GLOBAL global variable scope
T_IF if if
T_INC ++ incrementing/decrementing operators
T_INCLUDE include() include()
T_INCLUDE_ONCE include_once() include_once()
T_INT_CAST (int) or (integer) type-casting
T_ISSET isset() isset()
T_IS_EQUAL == comparison operators
T_IS_GREATER_OR_EQUAL >= comparison operators
T_IS_IDENTICAL === comparison operators
T_IS_NOT_EQUAL != or <> comparison operators
T_IS_NOT_IDENTICAL !== comparison operators
T_SMALLER_OR_EQUAL <= comparison operators
T_LINE __LINE__ constants
T_LIST list() list()
T_LNUMBER 123, 012, 0x1ac, etc integers
T_LOGICAL_AND and logical operators
T_LOGICAL_OR or logical operators
T_LOGICAL_XOR xor logical operators
T_MINUS_EQUAL -= assignment operators
T_ML_COMMENT /* and */ comments
T_MOD_EQUAL %= assignment operators
T_MUL_EQUAL *= assignment operators
T_NEW new classes and objects
T_OBJECT_CAST (object) type-casting
T_OBJECT_OPERATOR -> classes and objects
T_OLD_FUNCTION old_function old_function
T_OPEN_TAG <?php, <? or <% escaping from HTML
T_OPEN_TAG_WITH_ECHO <?= or <%= escaping from HTML
T_OR_EQUAL |= assignment operators
T_PLUS_EQUAL += assignment operators
T_PRINT print() print()
T_REQUIRE require() require()
T_REQUIRE_ONCE require_once() require_once()
T_RETURN return returning values
T_SL << bitwise operators
T_SL_EQUAL <<= assignment operators
T_SR >> bitwise operators
T_SR_EQUAL >>= assignment operators
T_START_HEREDOC <<< heredoc syntax
T_STATIC static variable scope
T_STRING_CAST (string) type-casting
T_SWITCH switch switch
T_UNSET unset() unset()
T_UNSET_CAST (unset) (not documented; casts to NULL)
T_USE use (not implemented)
T_VAR var classes and objects
T_VARIABLE $foo variables
T_WHILE while whiledo..while
T_XOR_EQUAL ^= assignment operators
T_FUNC_C __FUNCTION__ constants, since PHP 4.3.0
T_CLASS_C __CLASS__ constants, since PHP 4.3.0

[출처] 웹디황용

'Development > PHP' 카테고리의 다른 글

php - include vs require  (0) 2013.01.08
php - date() 오류  (0) 2012.07.21
php - mail 함수  (1) 2012.07.11
PHP Framework - CodeIgniter  (0) 2012.05.07
PHP framework 종류  (0) 2012.05.07
php 오류해석기  (0) 2012.02.03
Posted by linuxism