Constants

UNKNOWN

UNKNOWN

CLASS_PRESENCE_CHANGE

CLASS_PRESENCE_CHANGE

FUNCTION_PRESENCE_CHANGE

FUNCTION_PRESENCE_CHANGE

GOTO_KEYWORD

GOTO_KEYWORD

JUMP_LABEL

JUMP_LABEL

NAMESPACE_DECLERATION

NAMESPACE_DECLERATION

NAMESPACE_MAGIC_CONSTANT

NAMESPACE_MAGIC_CONSTANT

NAMESPACE_IMPORT

NAMESPACE_IMPORT

NOWDOC_LITERAL

NOWDOC_LITERAL

CALLSTATIC_MAGIC_METHOD

CALLSTATIC_MAGIC_METHOD

INVOKE_MAGIC_METHOD

INVOKE_MAGIC_METHOD

CONST_KEYWORD_OUTSIDE_CLASS

CONST_KEYWORD_OUTSIDE_CLASS

CONST_KEYWORD_DOC_SYNTAX

CONST_KEYWORD_DOC_SYNTAX

SHORT_TERNARY

SHORT_TERNARY

CLOSURE_DECLARATION

CLOSURE_DECLARATION

DYNAMIC_ACCESS_TO_STATIC

DYNAMIC_ACCESS_TO_STATIC

LATE_STATE_BINDING_USING_STATIC

LATE_STATE_BINDING_USING_STATIC

NAMESPACE_SEPARATOR

NAMESPACE_SEPARATOR

DIR_MAGIC_CONSTANT

DIR_MAGIC_CONSTANT

TRAIT_DEFINITION

TRAIT_DEFINITION

TRAIT_USE

TRAIT_USE

TRAIT_MAGIC_CONST

TRAIT_MAGIC_CONST

ARRAY_FUNCTION_DEREFERENCING

ARRAY_FUNCTION_DEREFERENCING

THIS_IN_CLOSURE

THIS_IN_CLOSURE

TYPEHINT_CALLABLE

TYPEHINT_CALLABLE

INSTANT_CLASS_MEMBER_ACCESS

INSTANT_CLASS_MEMBER_ACCESS

BINARY_NUMBER_DECLARATION

BINARY_NUMBER_DECLARATION

SHORT_ARRAY_DECLARATION

SHORT_ARRAY_DECLARATION

STATIC_CALL_BY_EXPRESSION

STATIC_CALL_BY_EXPRESSION

SHORT_ECHO_TAG

SHORT_ECHO_TAG

GENERATOR_DEFINITION

GENERATOR_DEFINITION

TRY_CATCH_FINALLY

TRY_CATCH_FINALLY

LIST_IN_FOREACH

LIST_IN_FOREACH

EXPR_IN_EMPTY

EXPR_IN_EMPTY

ARRAY_OR_STRING_DEREFERENCING

ARRAY_OR_STRING_DEREFERENCING

CLASS_NAME_RESOLUTION

CLASS_NAME_RESOLUTION

VARIADIC_ARGUMENT

VARIADIC_ARGUMENT

ARGUMENT_UNPACKING

ARGUMENT_UNPACKING

CONSTANT_SCALAR_EXPRESSION

CONSTANT_SCALAR_EXPRESSION

POW_OPERATOR

POW_OPERATOR

FUNCTION_IMPORT_USE

FUNCTION_IMPORT_USE

CONSTANT_IMPORT_USE

CONSTANT_IMPORT_USE

Properties

$reasonToRequirement

$reasonToRequirement : array

Type

array

$constantsCache

$constantsCache : array

Type

array

Methods

getRequiredVersionForReason()

getRequiredVersionForReason(integer  $reason) : string|boolean

Get the required version for a reason.

This static method may be used to get the required version of a reason constant defined in RequirementReason. If no matching version for a constant can be found an InvalidArgumentException will be thrown.

This method may return a falseable string or bool(false). Use !== false to check for a valid returned version. If false is returned refer to the corresponding method on the class that returned the constant.

Parameters

integer $reason

One of the constants defined in RequirementReason

Returns

string|boolean —

The required version or bool(false)

getReasonNameFromValue()

getReasonNameFromValue(integer  $value) : string

Get the constant name from constant value

Parameters

integer $value

Returns

string —

The name of the constant or 'UNKNOWN'

getReasonNames()

getReasonNames() : array

Get a list of defined constants and their values.

Returns

array

clear()

clear() 

Clears the cached constant lists.

May be useful to save memory or to force regeneration of the list in tests.

getReasonToRequirementBaseValues()

getReasonToRequirementBaseValues() : array

Map reasons to versions

This method returns an array having the constants defined by this class as keys and their required php versions as values.

Returns

array

__construct()

__construct()