PHP Class Zephir\Optimizers\EvalExpression

Resolves evaluation of expressions returning a C-int expression that can be used by 'if'/'while'/'do-while' statements
Afficher le fichier Open project: phalcon/zephir Class Usage Examples

Protected Properties

Свойство Type Description
$_unreachable
$_unreachableElse
$_usedVariables

Méthodes publiques

Méthode Description
getEvalVariable ( ) : Variable Returns the variable evaluated by the EvalExpression
getUsedVariables ( ) : array
isUnreachable ( ) : boolean Checks if the evaluation produce unreachable code
isUnreachableElse ( ) : boolean Checks if the evaluation not produce unreachable code
optimize ( $exprRaw, Zephir\CompilationContext $compilationContext ) : boolean | string Optimizes expressions
optimizeNot ( array $expr, Zephir\CompilationContext $compilationContext ) : boolean | string Skips the not operator by recursively optimizing the expression at its right

Method Details

getEvalVariable() public méthode

Returns the variable evaluated by the EvalExpression
public getEvalVariable ( ) : Variable
Résultat Zephir\Variable

getUsedVariables() public méthode

public getUsedVariables ( ) : array
Résultat array

isUnreachable() public méthode

Checks if the evaluation produce unreachable code
public isUnreachable ( ) : boolean
Résultat boolean

isUnreachableElse() public méthode

Checks if the evaluation not produce unreachable code
public isUnreachableElse ( ) : boolean
Résultat boolean

optimize() public méthode

Optimizes expressions
public optimize ( $exprRaw, Zephir\CompilationContext $compilationContext ) : boolean | string
$exprRaw
$compilationContext Zephir\CompilationContext
Résultat boolean | string

optimizeNot() public méthode

Skips the not operator by recursively optimizing the expression at its right
public optimizeNot ( array $expr, Zephir\CompilationContext $compilationContext ) : boolean | string
$expr array
$compilationContext Zephir\CompilationContext
Résultat boolean | string

Property Details

$_unreachable protected_oe property

protected $_unreachable

$_unreachableElse protected_oe property

protected $_unreachableElse

$_usedVariables protected_oe property

protected $_usedVariables