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 a part of Sculpin. * * (c) Dragonfly..

Decoded Output download

<?php

declare(strict_types=1);

/*
 * This file is a part of Sculpin.
 *
 * (c) Dragonfly Development Inc.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sculpin\Contrib\ProxySourceCollection\Sorter;

use Sculpin\Contrib\ProxySourceCollection\ProxySourceItem;

class DefaultSorter implements SorterInterface
{
    public function sort(ProxySourceItem $a, ProxySourceItem $b)
    {
        if ($a->date() && $a->title() && $b->date() && $b->title()) {
            return strnatcmp($b->date().' '.$b->title(), $a->date().' '.$a->title());
        }

        return strnatcmp($a->relativePathname(), $b->relativePathname());
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

/*
 * This file is a part of Sculpin.
 *
 * (c) Dragonfly Development Inc.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sculpin\Contrib\ProxySourceCollection\Sorter;

use Sculpin\Contrib\ProxySourceCollection\ProxySourceItem;

class DefaultSorter implements SorterInterface
{
    public function sort(ProxySourceItem $a, ProxySourceItem $b)
    {
        if ($a->date() && $a->title() && $b->date() && $b->title()) {
            return strnatcmp($b->date().' '.$b->title(), $a->date().' '.$a->title());
        }

        return strnatcmp($a->relativePathname(), $b->relativePathname());
    }
}

Function Calls

None

Variables

None

Stats

MD5 36f1ae6e2376c5f1de5fd76619c4c92c
Eval Count 0
Decode Time 94 ms