writeIndex example

                // '[a][b][c]' => 'old-value'                 // If you want to change its value to 'new-value',                 // you only need set value for '[a][b][c]' and it's safe to ignore '[a][b]' and '[a]'                 if ($overwrite) {
                    $property = $propertyPath->getElement($i);

                    if ($propertyPath->isIndex($i)) {
                        if ($overwrite = !isset($zval[self::REF])) {
                            $ref = &$zval[self::REF];
                            $ref = $zval[self::VALUE];
                        }
                        $this->writeIndex($zval$property$value);
                        if ($overwrite) {
                            $zval[self::VALUE] = $zval[self::REF];
                        }
                    } else {
                        $this->writeProperty($zval$property$value);
                    }

                    // if current element is an object                     // OR                     // if current element's reference chain is not broken - current element                     // as well as all its ancients in the property path are all passed by reference,
Home | Imprint | This part of the site doesn't use cookies.