Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /** * This file is part of the Carbon package. * * (c) Brian Nesbitt <brian@nesb..

Decoded Output download

<?php

/**
 * This file is part of the Carbon package.
 *
 * (c) Brian Nesbitt <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Carbon\CarbonInterface;

$processHoursFunction = static function (CarbonInterface $date, string $format) {
    return $format.''.($date->hour === 11 ? '' : '').'] LT';
};

/*
 * Authors:
 * - Kunal Marwaha
 * - Josh Soref
 * - Franois B
 * - Tim Fish
 * - Serhan Apaydn
 * - Max Mykhailenko
 * - JD Isaacks
 * - Max Kovpak
 * - AucT
 * - Philippe Vaucher
 * - Ilya Shaplyko
 * - Vadym Ievsieiev
 * - Denys Kurets
 * - Igor Kasyanchuk
 * - Tsutomu Kuroda
 * - tjku
 * - Max Melentiev
 * - Oleh
 * - epaminond
 * - Juanito Fatas
 * - Vitalii Khustochka
 * - Akira Matsuda
 * - Christopher Dell
 * - Enrique Vidal
 * - Simone Carletti
 * - Aaron Patterson
 * - Andriy Tyurnikov
 * - Nicols Hock Isaza
 * - Iwakura Taro
 * - Andrii Ponomarov
 * - alecrabbit
 * - vystepanenko
 * - AlexWalkerson
 * - Andre Havryliuk (Andrend)
 * - Max Datsenko (datsenko-md)
 */
return [
    'year' => ':count |:count |:count ',
    'y' => ':count|:count|:count',
    'a_year' => '{1}|:count |:count |:count ',
    'month' => ':count |:count |:count ',
    'm' => ':count',
    'a_month' => '{1}|:count |:count |:count ',
    'week' => ':count |:count |:count ',
    'w' => ':count',
    'a_week' => '{1}|:count |:count |:count ',
    'day' => ':count |:count |:count ',
    'd' => ':count',
    'a_day' => '{1}|:count |:count |:count ',
    'hour' => ':count |:count |:count ',
    'h' => ':count',
    'a_hour' => '{1}|:count |:count |:count ',
    'minute' => ':count |:count |:count ',
    'min' => ':count',
    'a_minute' => '{1}|:count |:count |:count ',
    'second' => ':count |:count |:count ',
    's' => ':count',
    'a_second' => '{1} |:count |:count |:count ',

    'hour_ago' => ':count |:count |:count ',
    'a_hour_ago' => '{1}|:count |:count |:count ',
    'minute_ago' => ':count |:count |:count ',
    'a_minute_ago' => '{1}|:count |:count |:count ',
    'second_ago' => ':count |:count |:count ',
    'a_second_ago' => '{1} |:count |:count |:count ',

    'hour_from_now' => ':count |:count |:count ',
    'a_hour_from_now' => '{1}|:count |:count |:count ',
    'minute_from_now' => ':count |:count |:count ',
    'a_minute_from_now' => '{1}|:count |:count |:count ',
    'second_from_now' => ':count |:count |:count ',
    'a_second_from_now' => '{1} |:count |:count |:count ',

    'hour_after' => ':count |:count |:count ',
    'a_hour_after' => '{1}|:count |:count |:count ',
    'minute_after' => ':count |:count |:count ',
    'a_minute_after' => '{1}|:count |:count |:count ',
    'second_after' => ':count |:count |:count ',
    'a_second_after' => '{1} |:count |:count |:count ',

    'hour_before' => ':count |:count |:count ',
    'a_hour_before' => '{1}|:count |:count |:count ',
    'minute_before' => ':count |:count |:count ',
    'a_minute_before' => '{1}|:count |:count |:count ',
    'second_before' => ':count |:count |:count ',
    'a_second_before' => '{1} |:count |:count |:count ',

    'ago' => ':time ',
    'from_now' => ' :time',
    'after' => ':time ',
    'before' => ':time ',
    'diff_now' => '',
    'diff_today' => '',
    'diff_today_regexp' => '(?:\s+)?',
    'diff_yesterday' => '',
    'diff_yesterday_regexp' => '(?:\s+)?',
    'diff_tomorrow' => '',
    'diff_tomorrow_regexp' => '(?:\s+)?',
    'diff_before_yesterday' => '',
    'diff_after_tomorrow' => '',
    'period_recurrences' => ' |:count |:count ',
    'period_interval' => ' :interval',
    'period_start_date' => ' :date',
    'period_end_date' => ' :date',
    'formats' => [
        'LT' => 'HH:mm',
        'LTS' => 'HH:mm:ss',
        'L' => 'DD.MM.YYYY',
        'LL' => 'D MMMM YYYY',
        'LLL' => 'D MMMM YYYY, HH:mm',
        'LLLL' => 'dddd, D MMMM YYYY, HH:mm',
    ],
    'calendar' => [
        'sameDay' => static fn (CarbonInterface $date) => $processHoursFunction($date, '[ '),
        'nextDay' => static fn (CarbonInterface $date) => $processHoursFunction($date, '[ '),
        'nextWeek' => static fn (CarbonInterface $date) => $processHoursFunction($date, '[] dddd ['),
        'lastDay' => static fn (CarbonInterface $date) => $processHoursFunction($date, '[ '),
        'lastWeek' => static fn (CarbonInterface $date) => match ($date->dayOfWeek) {
            0, 3, 5, 6 => $processHoursFunction($date, '[] dddd ['),
            default => $processHoursFunction($date, '[] dddd ['),
        },
        'sameElse' => 'L',
    ],
    'ordinal' => static fn ($number, $period) => match ($period) {
        'M', 'd', 'DDD', 'w', 'W' => $number.'-',
        'D' => $number.'-',
        default => $number,
    },
    'meridiem' => static function ($hour) {
        if ($hour < 4) {
            return '';
        }

        if ($hour < 12) {
            return '';
        }

        if ($hour < 17) {
            return '';
        }

        return '';
    },
    'months' => ['', '', '', '', '', '', '', '', '', '', '', ''],
    'months_standalone' => ['', '', '', '', '', '', '', '', '', '', '', ''],
    'months_short' => ['', '', '', '', '', '', '', '', '', '', '', ''],
    'months_regexp' => '/(D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/',
    'weekdays' => static function (CarbonInterface $date, $format, $index) {
        static $words = [
            'nominative' => ['', '', '', '', '', '', ''],
            'accusative' => ['', '', '', '', '', '', ''],
            'genitive' => ['', '', '', '', '', '', ''],
        ];

        $format ??= '';
        $nounCase = preg_match('/(\[(|||)\])\s+dddd/u', $format)
            ? 'accusative'
            : (
                preg_match('/\[?(?:|)?\s*\]\s+dddd/u', $format)
                    ? 'genitive'
                    : 'nominative'
            );

        return $words[$nounCase][$index] ?? null;
    },
    'weekdays_short' => ['', '', '', '', '', '', ''],
    'weekdays_min' => ['', '', '', '', '', '', ''],
    'first_day_of_week' => 1,
    'day_of_first_week_of_year' => 1,
    'list' => [', ', ' i '],
];
 ?>

Did this file decode correctly?

Original Code

<?php

/**
 * This file is part of the Carbon package.
 *
 * (c) Brian Nesbitt <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use Carbon\CarbonInterface;

$processHoursFunction = static function (CarbonInterface $date, string $format) {
    return $format.''.($date->hour === 11 ? '' : '').'] LT';
};

/*
 * Authors:
 * - Kunal Marwaha
 * - Josh Soref
 * - Franois B
 * - Tim Fish
 * - Serhan Apaydn
 * - Max Mykhailenko
 * - JD Isaacks
 * - Max Kovpak
 * - AucT
 * - Philippe Vaucher
 * - Ilya Shaplyko
 * - Vadym Ievsieiev
 * - Denys Kurets
 * - Igor Kasyanchuk
 * - Tsutomu Kuroda
 * - tjku
 * - Max Melentiev
 * - Oleh
 * - epaminond
 * - Juanito Fatas
 * - Vitalii Khustochka
 * - Akira Matsuda
 * - Christopher Dell
 * - Enrique Vidal
 * - Simone Carletti
 * - Aaron Patterson
 * - Andriy Tyurnikov
 * - Nicols Hock Isaza
 * - Iwakura Taro
 * - Andrii Ponomarov
 * - alecrabbit
 * - vystepanenko
 * - AlexWalkerson
 * - Andre Havryliuk (Andrend)
 * - Max Datsenko (datsenko-md)
 */
return [
    'year' => ':count |:count |:count ',
    'y' => ':count|:count|:count',
    'a_year' => '{1}|:count |:count |:count ',
    'month' => ':count |:count |:count ',
    'm' => ':count',
    'a_month' => '{1}|:count |:count |:count ',
    'week' => ':count |:count |:count ',
    'w' => ':count',
    'a_week' => '{1}|:count |:count |:count ',
    'day' => ':count |:count |:count ',
    'd' => ':count',
    'a_day' => '{1}|:count |:count |:count ',
    'hour' => ':count |:count |:count ',
    'h' => ':count',
    'a_hour' => '{1}|:count |:count |:count ',
    'minute' => ':count |:count |:count ',
    'min' => ':count',
    'a_minute' => '{1}|:count |:count |:count ',
    'second' => ':count |:count |:count ',
    's' => ':count',
    'a_second' => '{1} |:count |:count |:count ',

    'hour_ago' => ':count |:count |:count ',
    'a_hour_ago' => '{1}|:count |:count |:count ',
    'minute_ago' => ':count |:count |:count ',
    'a_minute_ago' => '{1}|:count |:count |:count ',
    'second_ago' => ':count |:count |:count ',
    'a_second_ago' => '{1} |:count |:count |:count ',

    'hour_from_now' => ':count |:count |:count ',
    'a_hour_from_now' => '{1}|:count |:count |:count ',
    'minute_from_now' => ':count |:count |:count ',
    'a_minute_from_now' => '{1}|:count |:count |:count ',
    'second_from_now' => ':count |:count |:count ',
    'a_second_from_now' => '{1} |:count |:count |:count ',

    'hour_after' => ':count |:count |:count ',
    'a_hour_after' => '{1}|:count |:count |:count ',
    'minute_after' => ':count |:count |:count ',
    'a_minute_after' => '{1}|:count |:count |:count ',
    'second_after' => ':count |:count |:count ',
    'a_second_after' => '{1} |:count |:count |:count ',

    'hour_before' => ':count |:count |:count ',
    'a_hour_before' => '{1}|:count |:count |:count ',
    'minute_before' => ':count |:count |:count ',
    'a_minute_before' => '{1}|:count |:count |:count ',
    'second_before' => ':count |:count |:count ',
    'a_second_before' => '{1} |:count |:count |:count ',

    'ago' => ':time ',
    'from_now' => ' :time',
    'after' => ':time ',
    'before' => ':time ',
    'diff_now' => '',
    'diff_today' => '',
    'diff_today_regexp' => '(?:\\s+)?',
    'diff_yesterday' => '',
    'diff_yesterday_regexp' => '(?:\\s+)?',
    'diff_tomorrow' => '',
    'diff_tomorrow_regexp' => '(?:\\s+)?',
    'diff_before_yesterday' => '',
    'diff_after_tomorrow' => '',
    'period_recurrences' => ' |:count |:count ',
    'period_interval' => ' :interval',
    'period_start_date' => ' :date',
    'period_end_date' => ' :date',
    'formats' => [
        'LT' => 'HH:mm',
        'LTS' => 'HH:mm:ss',
        'L' => 'DD.MM.YYYY',
        'LL' => 'D MMMM YYYY',
        'LLL' => 'D MMMM YYYY, HH:mm',
        'LLLL' => 'dddd, D MMMM YYYY, HH:mm',
    ],
    'calendar' => [
        'sameDay' => static fn (CarbonInterface $date) => $processHoursFunction($date, '[ '),
        'nextDay' => static fn (CarbonInterface $date) => $processHoursFunction($date, '[ '),
        'nextWeek' => static fn (CarbonInterface $date) => $processHoursFunction($date, '[] dddd ['),
        'lastDay' => static fn (CarbonInterface $date) => $processHoursFunction($date, '[ '),
        'lastWeek' => static fn (CarbonInterface $date) => match ($date->dayOfWeek) {
            0, 3, 5, 6 => $processHoursFunction($date, '[] dddd ['),
            default => $processHoursFunction($date, '[] dddd ['),
        },
        'sameElse' => 'L',
    ],
    'ordinal' => static fn ($number, $period) => match ($period) {
        'M', 'd', 'DDD', 'w', 'W' => $number.'-',
        'D' => $number.'-',
        default => $number,
    },
    'meridiem' => static function ($hour) {
        if ($hour < 4) {
            return '';
        }

        if ($hour < 12) {
            return '';
        }

        if ($hour < 17) {
            return '';
        }

        return '';
    },
    'months' => ['', '', '', '', '', '', '', '', '', '', '', ''],
    'months_standalone' => ['', '', '', '', '', '', '', '', '', '', '', ''],
    'months_short' => ['', '', '', '', '', '', '', '', '', '', '', ''],
    'months_regexp' => '/(D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/',
    'weekdays' => static function (CarbonInterface $date, $format, $index) {
        static $words = [
            'nominative' => ['', '', '', '', '', '', ''],
            'accusative' => ['', '', '', '', '', '', ''],
            'genitive' => ['', '', '', '', '', '', ''],
        ];

        $format ??= '';
        $nounCase = preg_match('/(\[(|||)\])\s+dddd/u', $format)
            ? 'accusative'
            : (
                preg_match('/\[?(?:|)?\s*\]\s+dddd/u', $format)
                    ? 'genitive'
                    : 'nominative'
            );

        return $words[$nounCase][$index] ?? null;
    },
    'weekdays_short' => ['', '', '', '', '', '', ''],
    'weekdays_min' => ['', '', '', '', '', '', ''],
    'first_day_of_week' => 1,
    'day_of_first_week_of_year' => 1,
    'list' => [', ', ' i '],
];

Function Calls

None

Variables

None

Stats

MD5 c80d4ce682083c3dd4e28b01077d165a
Eval Count 0
Decode Time 102 ms