public function generateVariableName($value)
    {
        $occurence = 0;

        if (is_object($value) === true) {
            $counter = $this->getObjectCount();
            $className = get_class($value);

            if (isset($counter[$className]) === false) {
                $occurence = 0;
                $counter[$className] = $occurence;
            } else {
                $occurence = $counter[$className];
            }

            $counter[$className] += 1;
            $this->setObjectCount($counter);
        } else {
            if (is_null($value) === true) {
                $type = 'null';
            } else {
                $type = gettype($value);
            }

            $counter = $this->getDatatypeCount();
            $occurence = $counter[$type];
            $counter[$type] += 1;

            $this->setDatatypeCount($counter);
        }

        return PhpMarshallingUtils::variableName($value, $occurence);
    }