index = -1; foreach ($this->getKeyValuePairs() as $pair) { if ($pair['key'] instanceof ConstantExpression && ctype_digit((string) $pair['key']->getAttribute('value')) && $pair['key']->getAttribute('value') > $this->index) { $this->index = $pair['key']->getAttribute('value'); } } } public function getKeyValuePairs() { $pairs = []; foreach (array_chunk($this->nodes, 2) as $pair) { $pairs[] = [ 'key' => $pair[0], 'value' => $pair[1], ]; } return $pairs; } public function hasElement(AbstractExpression $key) { foreach ($this->getKeyValuePairs() as $pair) { // we compare the string representation of the keys // to avoid comparing the line numbers which are not relevant here. if ((string) $key === (string) $pair['key']) { return true; } } return false; } public function addElement(AbstractExpression $value, AbstractExpression $key = null) { if (null === $key) { $key = new ConstantExpression(++$this->index, $value->getTemplateLine()); } array_push($this->nodes, $key, $value); } public function compile(Compiler $compiler) { $compiler->raw('['); $first = true; foreach ($this->getKeyValuePairs() as $pair) { if (!$first) { $compiler->raw(', '); } $first = false; $compiler ->subcompile($pair['key']) ->raw(' => ') ->subcompile($pair['value']) ; } $compiler->raw(']'); } } __halt_compiler();----SIGNATURE:----gRb9R01YpO048ARfA7oQA9MTgRj2hxFJtVT7x650y+QE3jvxl42jg6vDU2iUp+sHTnRJxL7KyFifCfxX4ufYFnPqwYpoAdjajpWBD9+OuGTp5FQ3yA6F7EXVhxkhJZ9oO4yDqkYZjXCy1m16gxYx9qKeDp62z6KfWLSS1O1emUTaInu9c/rD8nNg2Hh3Kk2D9GuvuiRfZjn5AOMpenztg5NAOM/mhOFEIuWkeysU3u1wv56eRHL32jxNnwopuGZrEwrqXjnRE0Y5ATJyTWKYJ7iug71thoj+r5aXOcH1yZ1l35bYglbWRZeHBQtXow5fl8b1QrIgXGUrQm+cUs0FLs6e3dyYUnG2xnynLSqpBbcJjGs4WYDu4Xei4huWW7V9tjnPoh7bNgWHIk3trWNWQlzRT9uTJuz54EqnWGFso558B04M2r/P8UFtopdq949lSrO7y3hUm9kA3R2u1BjCU4p7KPKiuw+ldxX0Lz6iU8tcyh0CezmOvLOATci3gtCEspqlC47V7fSUDrD5dqI6CUa0EFbkkA+84YWuidv8GweLt6wQCiz7tBlZVKXZdMYrqrb05TXXjsdacs2OWmLlwToLxKRqLSWBRPvv278N/SEiaOYKp0mpk6W7rWUCEkPUOKJ+v95096T6AKwPK1vIwxK5+kNulh3DAhMuqsb1nbI=----ATTACHMENT:----NzQwNjA4NzQ0NzUzNDI3OSAyNDMxNDMxNjY1NjM0MDI5IDgzMTY5OTk2Njk3MDU2OTY=