protected compile ( PhpParser\Node\Expr\BinaryOp\BooleanAnd $expr, |
||
$expr | PhpParser\Node\Expr\BinaryOp\BooleanAnd | |
$context | ||
return |
protected function compile($expr, Context $context)
{
$left = $context->getExpressionCompiler()->compile($expr->left);
$right = $context->getExpressionCompiler()->compile($expr->right);
if ($left->isTypeKnown() && $right->isTypeKnown()) {
return CompiledExpression::fromZvalValue($left->getValue() && $right->getValue());
}
return new CompiledExpression();
}