Annotation of embedaddon/php/ext/tokenizer/tests/001.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: token_name()
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("tokenizer")) print "skip"; ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: echo token_name(T_INCLUDE), "\n";
! 9: echo token_name(T_INCLUDE_ONCE), "\n";
! 10: echo token_name(T_EVAL), "\n";
! 11: echo token_name(T_REQUIRE), "\n";
! 12: echo token_name(T_REQUIRE_ONCE), "\n";
! 13: echo token_name(T_LOGICAL_OR), "\n";
! 14: echo token_name(T_LOGICAL_XOR), "\n";
! 15: echo token_name(T_LOGICAL_AND), "\n";
! 16: echo token_name(T_PRINT), "\n";
! 17: echo token_name(T_PLUS_EQUAL), "\n";
! 18: echo token_name(T_MINUS_EQUAL), "\n";
! 19: echo token_name(T_MUL_EQUAL), "\n";
! 20: echo token_name(T_DIV_EQUAL), "\n";
! 21: echo token_name(T_CONCAT_EQUAL), "\n";
! 22: echo token_name(T_MOD_EQUAL), "\n";
! 23: echo token_name(T_AND_EQUAL), "\n";
! 24: echo token_name(T_OR_EQUAL), "\n";
! 25: echo token_name(T_XOR_EQUAL), "\n";
! 26: echo token_name(T_SL_EQUAL), "\n";
! 27: echo token_name(T_SR_EQUAL), "\n";
! 28: echo token_name(T_BOOLEAN_OR), "\n";
! 29: echo token_name(T_BOOLEAN_AND), "\n";
! 30: echo token_name(T_IS_EQUAL), "\n";
! 31: echo token_name(T_IS_NOT_EQUAL), "\n";
! 32: echo token_name(T_IS_IDENTICAL), "\n";
! 33: echo token_name(T_IS_NOT_IDENTICAL), "\n";
! 34: echo token_name(T_IS_SMALLER_OR_EQUAL), "\n";
! 35: echo token_name(T_IS_GREATER_OR_EQUAL), "\n";
! 36: echo token_name(T_SL), "\n";
! 37: echo token_name(T_SR), "\n";
! 38: echo token_name(T_INC), "\n";
! 39: echo token_name(T_DEC), "\n";
! 40: echo token_name(T_INT_CAST), "\n";
! 41: echo token_name(T_DOUBLE_CAST), "\n";
! 42: echo token_name(T_STRING_CAST), "\n";
! 43: echo token_name(T_ARRAY_CAST), "\n";
! 44: echo token_name(T_OBJECT_CAST), "\n";
! 45: echo token_name(T_BOOL_CAST), "\n";
! 46: echo token_name(T_UNSET_CAST), "\n";
! 47: echo token_name(T_NEW), "\n";
! 48: echo token_name(T_EXIT), "\n";
! 49: echo token_name(T_IF), "\n";
! 50: echo token_name(T_ELSEIF), "\n";
! 51: echo token_name(T_ELSE), "\n";
! 52: echo token_name(T_ENDIF), "\n";
! 53: echo token_name(T_LNUMBER), "\n";
! 54: echo token_name(T_DNUMBER), "\n";
! 55: echo token_name(T_STRING), "\n";
! 56: echo token_name(T_STRING_VARNAME), "\n";
! 57: echo token_name(T_VARIABLE), "\n";
! 58: echo token_name(T_NUM_STRING), "\n";
! 59: echo token_name(T_INLINE_HTML), "\n";
! 60: echo token_name(T_ENCAPSED_AND_WHITESPACE), "\n";
! 61: echo token_name(T_CONSTANT_ENCAPSED_STRING), "\n";
! 62: echo token_name(T_ECHO), "\n";
! 63: echo token_name(T_DO), "\n";
! 64: echo token_name(T_WHILE), "\n";
! 65: echo token_name(T_ENDWHILE), "\n";
! 66: echo token_name(T_FOR), "\n";
! 67: echo token_name(T_ENDFOR), "\n";
! 68: echo token_name(T_FOREACH), "\n";
! 69: echo token_name(T_ENDFOREACH), "\n";
! 70: echo token_name(T_DECLARE), "\n";
! 71: echo token_name(T_ENDDECLARE), "\n";
! 72: echo token_name(T_AS), "\n";
! 73: echo token_name(T_SWITCH), "\n";
! 74: echo token_name(T_ENDSWITCH), "\n";
! 75: echo token_name(T_CASE), "\n";
! 76: echo token_name(T_DEFAULT), "\n";
! 77: echo token_name(T_BREAK), "\n";
! 78: echo token_name(T_CONTINUE), "\n";
! 79: echo token_name(T_FUNCTION), "\n";
! 80: echo token_name(T_CONST), "\n";
! 81: echo token_name(T_RETURN), "\n";
! 82: echo token_name(T_USE), "\n";
! 83: echo token_name(T_GLOBAL), "\n";
! 84: echo token_name(T_STATIC), "\n";
! 85: echo token_name(T_VAR), "\n";
! 86: echo token_name(T_UNSET), "\n";
! 87: echo token_name(T_ISSET), "\n";
! 88: echo token_name(T_EMPTY), "\n";
! 89: echo token_name(T_CLASS), "\n";
! 90: echo token_name(T_EXTENDS), "\n";
! 91: echo token_name(T_INTERFACE), "\n";
! 92: echo token_name(T_IMPLEMENTS), "\n";
! 93: echo token_name(T_OBJECT_OPERATOR), "\n";
! 94: echo token_name(T_DOUBLE_ARROW), "\n";
! 95: echo token_name(T_LIST), "\n";
! 96: echo token_name(T_ARRAY), "\n";
! 97: echo token_name(T_CLASS_C), "\n";
! 98: echo token_name(T_FUNC_C), "\n";
! 99: echo token_name(T_METHOD_C), "\n";
! 100: echo token_name(T_LINE), "\n";
! 101: echo token_name(T_FILE), "\n";
! 102: echo token_name(T_COMMENT), "\n";
! 103: echo token_name(T_DOC_COMMENT), "\n";
! 104: echo token_name(T_OPEN_TAG), "\n";
! 105: echo token_name(T_OPEN_TAG_WITH_ECHO), "\n";
! 106: echo token_name(T_CLOSE_TAG), "\n";
! 107: echo token_name(T_WHITESPACE), "\n";
! 108: echo token_name(T_START_HEREDOC), "\n";
! 109: echo token_name(T_END_HEREDOC), "\n";
! 110: echo token_name(T_DOLLAR_OPEN_CURLY_BRACES), "\n";
! 111: echo token_name(T_CURLY_OPEN), "\n";
! 112: echo token_name(T_PAAMAYIM_NEKUDOTAYIM), "\n";
! 113: echo token_name(T_PAAMAYIM_NEKUDOTAYIM), "\n";
! 114: echo token_name(T_ABSTRACT), "\n";
! 115: echo token_name(T_CATCH), "\n";
! 116: echo token_name(T_FINAL), "\n";
! 117: echo token_name(T_INSTANCEOF), "\n";
! 118: echo token_name(T_PRIVATE), "\n";
! 119: echo token_name(T_PROTECTED), "\n";
! 120: echo token_name(T_PUBLIC), "\n";
! 121: echo token_name(T_THROW), "\n";
! 122: echo token_name(T_TRY), "\n";
! 123: echo token_name(T_CLONE), "\n";
! 124: echo token_name(T_HALT_COMPILER), "\n";
! 125:
! 126: echo token_name(-1), "\n";
! 127: echo token_name(0x8000000F), "\n";
! 128: echo token_name("string"), "\n";
! 129: echo token_name(array()), "\n";
! 130:
! 131: echo "Done\n";
! 132: ?>
! 133: --EXPECTF--
! 134: T_INCLUDE
! 135: T_INCLUDE_ONCE
! 136: T_EVAL
! 137: T_REQUIRE
! 138: T_REQUIRE_ONCE
! 139: T_LOGICAL_OR
! 140: T_LOGICAL_XOR
! 141: T_LOGICAL_AND
! 142: T_PRINT
! 143: T_PLUS_EQUAL
! 144: T_MINUS_EQUAL
! 145: T_MUL_EQUAL
! 146: T_DIV_EQUAL
! 147: T_CONCAT_EQUAL
! 148: T_MOD_EQUAL
! 149: T_AND_EQUAL
! 150: T_OR_EQUAL
! 151: T_XOR_EQUAL
! 152: T_SL_EQUAL
! 153: T_SR_EQUAL
! 154: T_BOOLEAN_OR
! 155: T_BOOLEAN_AND
! 156: T_IS_EQUAL
! 157: T_IS_NOT_EQUAL
! 158: T_IS_IDENTICAL
! 159: T_IS_NOT_IDENTICAL
! 160: T_IS_SMALLER_OR_EQUAL
! 161: T_IS_GREATER_OR_EQUAL
! 162: T_SL
! 163: T_SR
! 164: T_INC
! 165: T_DEC
! 166: T_INT_CAST
! 167: T_DOUBLE_CAST
! 168: T_STRING_CAST
! 169: T_ARRAY_CAST
! 170: T_OBJECT_CAST
! 171: T_BOOL_CAST
! 172: T_UNSET_CAST
! 173: T_NEW
! 174: T_EXIT
! 175: T_IF
! 176: T_ELSEIF
! 177: T_ELSE
! 178: T_ENDIF
! 179: T_LNUMBER
! 180: T_DNUMBER
! 181: T_STRING
! 182: T_STRING_VARNAME
! 183: T_VARIABLE
! 184: T_NUM_STRING
! 185: T_INLINE_HTML
! 186: T_ENCAPSED_AND_WHITESPACE
! 187: T_CONSTANT_ENCAPSED_STRING
! 188: T_ECHO
! 189: T_DO
! 190: T_WHILE
! 191: T_ENDWHILE
! 192: T_FOR
! 193: T_ENDFOR
! 194: T_FOREACH
! 195: T_ENDFOREACH
! 196: T_DECLARE
! 197: T_ENDDECLARE
! 198: T_AS
! 199: T_SWITCH
! 200: T_ENDSWITCH
! 201: T_CASE
! 202: T_DEFAULT
! 203: T_BREAK
! 204: T_CONTINUE
! 205: T_FUNCTION
! 206: T_CONST
! 207: T_RETURN
! 208: T_USE
! 209: T_GLOBAL
! 210: T_STATIC
! 211: T_VAR
! 212: T_UNSET
! 213: T_ISSET
! 214: T_EMPTY
! 215: T_CLASS
! 216: T_EXTENDS
! 217: T_INTERFACE
! 218: T_IMPLEMENTS
! 219: T_OBJECT_OPERATOR
! 220: T_DOUBLE_ARROW
! 221: T_LIST
! 222: T_ARRAY
! 223: T_CLASS_C
! 224: T_FUNC_C
! 225: T_METHOD_C
! 226: T_LINE
! 227: T_FILE
! 228: T_COMMENT
! 229: T_DOC_COMMENT
! 230: T_OPEN_TAG
! 231: T_OPEN_TAG_WITH_ECHO
! 232: T_CLOSE_TAG
! 233: T_WHITESPACE
! 234: T_START_HEREDOC
! 235: T_END_HEREDOC
! 236: T_DOLLAR_OPEN_CURLY_BRACES
! 237: T_CURLY_OPEN
! 238: T_DOUBLE_COLON
! 239: T_DOUBLE_COLON
! 240: T_ABSTRACT
! 241: T_CATCH
! 242: T_FINAL
! 243: T_INSTANCEOF
! 244: T_PRIVATE
! 245: T_PROTECTED
! 246: T_PUBLIC
! 247: T_THROW
! 248: T_TRY
! 249: T_CLONE
! 250: T_HALT_COMPILER
! 251: UNKNOWN
! 252: UNKNOWN
! 253:
! 254: Warning: token_name() expects parameter 1 to be long, string given in %s on line %d
! 255:
! 256:
! 257: Warning: token_name() expects parameter 1 to be long, array given in %s on line %d
! 258:
! 259: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>