private function doArrayAssignment($codePrinter, $resolvedExpr, $symbolVariable, $variable, $statement, $compilationContext)
{
switch ($resolvedExpr->getType()) {
case 'variable':
case 'array':
switch ($statement['operator']) {
case 'assign':
if ($variable != $resolvedExpr->getCode()) {
$symbolVariable->setMustInitNull(true);
$compilationContext->symbolTable->mustGrownStack(true);
/* Inherit the dynamic type data from the assigned value */
$symbolVariable->setDynamicTypes('array');
$symbolVariable->increaseVariantIfNull();
$symbol = $compilationContext->backend->getVariableCode($symbolVariable);
$codePrinter->output('ZEPHIR_CPY_WRT(' . $symbol . ', ' . $compilationContext->backend->resolveValue($resolvedExpr, $compilationContext) . ');');
}
break;
default:
throw new CompilerException("Operator '" . $statement['operator'] . "' is not supported for variable type: " . $resolvedExpr->getType(), $resolvedExpr->getOriginal());
}
break;
default:
throw new CompilerException("Cannot '" . $statement['operator'] . "' " . $resolvedExpr->getType() . " for array type", $resolvedExpr->getOriginal());
}
}