T_variable

Various parts of the PHP language are represented internally by tokens. A code snippet that contains an invalid sequence of tokens may lead to errors like Parse error: syntax error, unexpected token ', expecting '(' in script.php on line 10.' where token is internally represented by T_IS_EQUAL.

May 12, 2020 The help desk software for IT. Track users' IT needs, easily, and with only the features you need. In this example, a Variable is used to hold a message string. This message is written to the console window by a WriteLine activity. WPKube is an online WordPress resource which focuses on WordPress tutorials, How-to’s, guides, plugins, news, and more. We aim to provide the most comprehensive beginner’s guides to anything about WordPress — from installing plugins, themes, automated installs and setups, to creating and setting up pages for your website. It looks like you accidentally wrote then copied and pasted 'mysqli' as part of the function argument instead of just the prefix to the function name. See full list on tsql.info.

The following table lists all tokens. They are also available as PHP constants.

T_variable

Note: Usage of T_* constants

T_* constants values are automatically generated based on PHP's underlying parser infrastructure. This means that the concrete value of a token may change between two PHP versions. For example the T_FILE constant is 365 in PHP 5.3, while the same value refers now to T_TRAIT in PHP 5.4 and the value of T_FILE is 369. This means that your code should never rely directly on the original T_* values taken from PHP version X.Y.Z, to provide some compatibility across multiple PHP versions.

To make use of T_* constants across multiple PHP versions, undefined constants may be defined by the user (using big numbers like 10000) with an appropriate strategy that will work with both PHP versions and T_* values. Trello ticktick.

<?php
// Prior to PHP 7.4.0, T_FN is not defined.
defined('T_FN') define('T_FN', 10001);

What Is T_variable

Tokens
TokenSyntaxReference
T_ABSTRACTabstractClass Abstraction
T_AND_EQUAL&=assignment operators
T_ARRAYarray()array(), array syntax
T_ARRAY_CAST(array)type-casting
T_ASasforeach
T_BAD_CHARACTER anything below ASCII 32 except t (0x09), n (0x0a) and r (0x0d) (available since PHP 7.4.0)
T_BOOLEAN_AND&&logical operators
T_BOOLEAN_ORlogical operators
T_BOOL_CAST(bool) or (boolean)type-casting
T_BREAKbreakbreak
T_CALLABLEcallablecallable
T_CASEcaseswitch
T_CATCHcatchExceptions
T_CLASSclassclasses and objects
T_CLASS_C__CLASS__magic constants
T_CLONEcloneclasses and objects
T_CLOSE_TAG?> or %>escaping from HTML
T_COALESCE??comparison operators
T_COALESCE_EQUAL??=assignment operators (available since PHP 7.4.0)
T_COMMENT// or #, and /* */comments
T_CONCAT_EQUAL.=assignment operators
T_CONSTconstclass constants
T_CONSTANT_ENCAPSED_STRING'foo' or 'bar'string syntax
T_CONTINUEcontinuecontinue
T_CURLY_OPEN{$complex variable parsed syntax
T_DEC--incrementing/decrementing operators
T_DECLAREdeclaredeclare
T_DEFAULTdefaultswitch
T_DIR__DIR__magic constants
T_DIV_EQUAL/=assignment operators
T_DNUMBER0.12, etc.floating point numbers
T_DOdodo.while
T_DOC_COMMENT/** */PHPDoc style comments
T_DOLLAR_OPEN_CURLY_BRACES${complex variable parsed syntax
T_DOUBLE_ARROW=>array syntax
T_DOUBLE_CAST(real), (double) or (float)type-casting
T_DOUBLE_COLON::see T_PAAMAYIM_NEKUDOTAYIM below
T_ECHOechoecho
T_ELLIPSIS..function arguments
T_ELSEelseelse
T_ELSEIFelseifelseif
T_EMPTYemptyempty()
T_ENCAPSED_AND_WHITESPACE' $a'constant part of string with variables
T_ENDDECLAREenddeclaredeclare, alternative syntax
T_ENDFORendforfor, alternative syntax
T_ENDFOREACHendforeachforeach, alternative syntax
T_ENDIFendifif, alternative syntax
T_ENDSWITCHendswitchswitch, alternative syntax
T_ENDWHILEendwhilewhile, alternative syntax
T_END_HEREDOCheredoc syntax
T_EVALeval()eval()
T_EXITexit or dieexit(), die()
T_EXTENDSextendsextends, classes and objects
T_FILE__FILE__magic constants
T_FINALfinalFinal Keyword
T_FINALLYfinallyExceptions
T_FNfnarrow functions (available since PHP 7.4.0)
T_FORforfor
T_FOREACHforeachforeach
T_FUNCTIONfunctionfunctions
T_FUNC_C__FUNCTION__magic constants
T_GLOBALglobalvariable scope
T_GOTOgotogoto
T_HALT_COMPILER__halt_compiler()__halt_compiler
T_IFifif
T_IMPLEMENTSimplementsObject Interfaces
T_INC++incrementing/decrementing operators
T_INCLUDEinclude()include
T_INCLUDE_ONCEinclude_once()include_once
T_INLINE_HTMLtext outside PHP
T_INSTANCEOFinstanceoftype operators
T_INSTEADOFinsteadofTraits
T_INTERFACEinterfaceObject Interfaces
T_INT_CAST(int) or (integer)type-casting
T_ISSETisset()isset()
T_IS_EQUALcomparison operators
T_IS_GREATER_OR_EQUAL>=comparison operators
T_IS_IDENTICALcomparison operators
T_IS_NOT_EQUAL!= or <>comparison operators
T_IS_NOT_IDENTICAL!comparison operators
T_IS_SMALLER_OR_EQUAL<=comparison operators
T_LINE__LINE__magic constants
T_LISTlist()list()
T_LNUMBER123, 012, 0x1ac, etc.integers
T_LOGICAL_ANDandlogical operators
T_LOGICAL_ORorlogical operators
T_LOGICAL_XORxorlogical operators
T_METHOD_C__METHOD__magic constants
T_MINUS_EQUAL-=assignment operators
T_MOD_EQUAL%=assignment operators
T_MUL_EQUAL*=assignment operators
T_NAMESPACEnamespacenamespaces
T_NEWnewclasses and objects
T_NS_C__NAMESPACE__namespaces
T_NS_SEPARATORnamespaces
T_NUM_STRING'$a[0]'numeric array index inside string
T_OBJECT_CAST(object)type-casting
T_OBJECT_OPERATOR->classes and objects
T_NULLSAFE_OBJECT_OPERATOR?->classes and objects
T_OPEN_TAG<?php, <? or <%escaping from HTML
T_OPEN_TAG_WITH_ECHO<?= or <%=escaping from HTML
T_OR_EQUAL =assignment operators
T_PAAMAYIM_NEKUDOTAYIM::::. Also defined as T_DOUBLE_COLON.
T_PLUS_EQUAL+=assignment operators
T_POW**arithmetic operators
T_POW_EQUAL**=assignment operators
T_PRINTprint()print
T_PRIVATEprivateclasses and objects
T_PROTECTEDprotectedclasses and objects
T_PUBLICpublicclasses and objects
T_REQUIRErequire()require
T_REQUIRE_ONCErequire_once()require_once
T_RETURNreturnreturning values
T_SL<<bitwise operators
T_SL_EQUAL<<=assignment operators
T_SPACESHIP<=>comparison operators
T_SR>>bitwise operators
T_SR_EQUAL>>=assignment operators
T_START_HEREDOC<<<heredoc syntax
T_STATICstaticvariable scope
T_STRINGparent, self, etc. identifiers, e.g. keywords like parent and self, function names, class names and more are matched. See also T_CONSTANT_ENCAPSED_STRING.
T_STRING_CAST(string)type-casting
T_STRING_VARNAME'${acomplex variable parsed syntax
T_SWITCHswitchswitch
T_THROWthrowExceptions
T_TRAITtraitTraits
T_TRAIT_C__TRAIT____TRAIT__
T_TRYtryExceptions
T_UNSETunset()unset()
T_UNSET_CAST(unset)type-casting
T_USEusenamespaces
T_VARvarclasses and objects
T_VARIABLE$foovariables
T_WHILEwhilewhile, do.while
T_WHITESPACEt rn
T_XOR_EQUAL^=assignment operators
T_YIELDyieldgenerators
T_YIELD_FROMyield fromgenerators

T Variable Physics

See also token_name().