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 declare(strict_types=1); /** * This file is part of the Carbon package. * * (c)..

Decoded Output download

<?php

declare(strict_types=1);

/**
 * 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.
 */

namespace Tests\CarbonInterval;

use Carbon\CarbonInterval;
use Tests\AbstractTestCase;

class AlternativeNumbersTest extends AbstractTestCase
{
    public function testAlternativesNumbers()
    {
        $this->assertSame(
            ' ',
            CarbonInterval::hours(52)->locale('fa')->forHumans(['altNumbers' => true]),
        );

        $this->assertSame(
            ' ',
            CarbonInterval::hour()->locale('fa')->forHumans(['altNumbers' => 'fa']),
        );

        $this->assertSame(
            '1',
            CarbonInterval::hour()->locale('ja')->forHumans(['altNumbers' => 'fa']),
        );

        $this->assertSame(
            ' ',
            CarbonInterval::hour()->locale('fa')->forHumans(['altNumbers' => ['fa', 'ja']]),
        );

        $this->assertSame(
            '52 ',
            CarbonInterval::hours(52)->locale('fa')->forHumans(['altNumbers' => 'ja']),
        );

        $this->assertSame(
            '52 ',
            CarbonInterval::hours(52)->locale('fa')->forHumans(['altNumbers' => ['lzh', 'ja']]),
        );

        $this->assertSame(
            '',
            CarbonInterval::hours(52)->locale('ja')->forHumans(['altNumbers' => ['lzh', 'ja']]),
        );

        $this->assertSame(
            '-6',
            CarbonInterval::hours(-6)->locale('fa')->translateNumber(-6),
        );
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

/**
 * 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.
 */

namespace Tests\CarbonInterval;

use Carbon\CarbonInterval;
use Tests\AbstractTestCase;

class AlternativeNumbersTest extends AbstractTestCase
{
    public function testAlternativesNumbers()
    {
        $this->assertSame(
            ' ',
            CarbonInterval::hours(52)->locale('fa')->forHumans(['altNumbers' => true]),
        );

        $this->assertSame(
            ' ',
            CarbonInterval::hour()->locale('fa')->forHumans(['altNumbers' => 'fa']),
        );

        $this->assertSame(
            '1',
            CarbonInterval::hour()->locale('ja')->forHumans(['altNumbers' => 'fa']),
        );

        $this->assertSame(
            ' ',
            CarbonInterval::hour()->locale('fa')->forHumans(['altNumbers' => ['fa', 'ja']]),
        );

        $this->assertSame(
            '52 ',
            CarbonInterval::hours(52)->locale('fa')->forHumans(['altNumbers' => 'ja']),
        );

        $this->assertSame(
            '52 ',
            CarbonInterval::hours(52)->locale('fa')->forHumans(['altNumbers' => ['lzh', 'ja']]),
        );

        $this->assertSame(
            '',
            CarbonInterval::hours(52)->locale('ja')->forHumans(['altNumbers' => ['lzh', 'ja']]),
        );

        $this->assertSame(
            '-6',
            CarbonInterval::hours(-6)->locale('fa')->translateNumber(-6),
        );
    }
}

Function Calls

None

Variables

None

Stats

MD5 02c2b9c843ad4a19903017edcdeed118
Eval Count 0
Decode Time 87 ms