public function is_class_constant( $stackPtr ) {
		if ( ! isset( $this->tokens[ $stackPtr ] ) || \T_CONST !== $this->tokens[ $stackPtr ]['code'] ) {
			return false;
		}

		// Note: traits can not declare constants.
		$valid_scopes = array(
			'T_CLASS'      => true,
			'T_ANON_CLASS' => true,
			'T_INTERFACE'  => true,
		);

		return is_int( $this->valid_direct_scope( $stackPtr, $valid_scopes ) );
	}
public function is_class_constant( $stackPtr ) {
		if ( ! isset( $this->tokens[ $stackPtr ] ) || \T_CONST !== $this->tokens[ $stackPtr ]['code'] ) {
			return false;
		}

		// Note: traits can not declare constants.
		$valid_scopes = array(
			'T_CLASS'      => true,
			'T_ANON_CLASS' => true,
			'T_INTERFACE'  => true,
		);

		return is_int( $this->valid_direct_scope( $stackPtr, $valid_scopes ) );
	}
public function is_class_constant ( $ stackPtr ) { if ( ! isset ( $ this -> tokens [ $ stackPtr ] ) || \ T_CONST !== $ this -> tokens [ $ stackPtr ] [ 'code' ] ) { return false ; } // Note: traits can not declare constants. $ valid_scopes = array ( 'T_CLASS' => true , 'T_ANON_CLASS' => true , 'T_INTERFACE' => true , ) ; return is_int ( $ this -> valid_direct_scope ( $ stackPtr , $ valid_scopes ) ) ; }
Check whether a T_CONST token is a class constant declaration.

@since 0.14.0

@param int $stackPtr  The position in the stack of the T_CONST token to verify.

@return bool
Check whether a T_CONST token is a class constant declaration .