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 namespace CollectionHelper; use function PHPStan\Testing\assertType; /** @templat..

Decoded Output download

<?php

namespace CollectionHelper;

use function PHPStan\TestingssertType;

/** @template T */
class Ok
{
    /** @param  T  $value */
    public function __construct(public mixed $value)
    {
    }
}

/** @template T */
class Some
{
    /** @param  T  $value */
    public function __construct(public mixed $value)
    {
    }
}

function test(): void
{
    assertType('Illuminate\Support\Collection<int, CollectionHelper\Ok<CollectionHelper\Some<int>>>', collect([new Ok(new Some(42))]));
    assertType('Illuminate\Support\Collection<int, CollectionHelper\Ok<CollectionHelper\Some<int>>>', collect([42])->map(fn (int $i) => new Ok(new Some($i))));
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace CollectionHelper;

use function PHPStan\Testing\assertType;

/** @template T */
class Ok
{
    /** @param  T  $value */
    public function __construct(public mixed $value)
    {
    }
}

/** @template T */
class Some
{
    /** @param  T  $value */
    public function __construct(public mixed $value)
    {
    }
}

function test(): void
{
    assertType('Illuminate\Support\Collection<int, CollectionHelper\Ok<CollectionHelper\Some<int>>>', collect([new Ok(new Some(42))]));
    assertType('Illuminate\Support\Collection<int, CollectionHelper\Ok<CollectionHelper\Some<int>>>', collect([42])->map(fn (int $i) => new Ok(new Some($i))));
}

Function Calls

None

Variables

None

Stats

MD5 f88da4e562e71879e6d1448604eb1f06
Eval Count 0
Decode Time 89 ms