src/Carbon/Traits/Converter.php
public function toArray()
    {
        return [
            'year' => $this->year,
            'month' => $this->month,
            'day' => $this->day,
            'dayOfWeek' => $this->dayOfWeek,
            'dayOfYear' => $this->dayOfYear,
            'hour' => $this->hour,
            'minute' => $this->minute,
            'second' => $this->second,
            'micro' => $this->micro,
            'timestamp' => $this->timestamp,
            'formatted' => $this->rawFormat(defined('static::DEFAULT_TO_STRING_FORMAT') ? static::DEFAULT_TO_STRING_FORMAT : CarbonInterface::DEFAULT_TO_STRING_FORMAT),
            'timezone' => $this->timezone,
        ];
    }
public function toArray()
    {
        return [
            'year' => $this->year,
            'month' => $this->month,
            'day' => $this->day,
            'dayOfWeek' => $this->dayOfWeek,
            'dayOfYear' => $this->dayOfYear,
            'hour' => $this->hour,
            'minute' => $this->minute,
            'second' => $this->second,
            'micro' => $this->micro,
            'timestamp' => $this->timestamp,
            'formatted' => $this->rawFormat(defined('static::DEFAULT_TO_STRING_FORMAT') ? static::DEFAULT_TO_STRING_FORMAT : CarbonInterface::DEFAULT_TO_STRING_FORMAT),
            'timezone' => $this->timezone,
        ];
    }
public function toArray ( ) { return [ 'year' => $ this -> year , 'month' => $ this -> month , 'day' => $ this -> day , 'dayOfWeek' => $ this -> dayOfWeek , 'dayOfYear' => $ this -> dayOfYear , 'hour' => $ this -> hour , 'minute' => $ this -> minute , 'second' => $ this -> second , 'micro' => $ this -> micro , 'timestamp' => $ this -> timestamp , 'formatted' => $ this -> rawFormat ( defined ( 'static::DEFAULT_TO_STRING_FORMAT' ) ? static :: DEFAULT_TO_STRING_FORMAT : CarbonInterface :: DEFAULT_TO_STRING_FORMAT ) , 'timezone' => $ this -> timezone , ] ; }
Get default array representation.

@example
```
var_dump(Carbon::now()->toArray());
```

@return array
Get default array representation .