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 Illuminate\Tests\Integration\Http\Fixtures; use Illuminate\Http\Resource..
Decoded Output download
<?php
namespace Illuminate\Tests\Integration\Http\Fixtures;
use Illuminate\Http\Resources\Json\JsonResource;
class PostResourceWithJsonOptionsAndTypeHints extends JsonResource
{
public function __construct(Post $resource)
{
parent::__construct($resource);
}
public function toArray($request)
{
return [
'id' => $this->id,
'title' => $this->title,
'reading_time' => $this->reading_time,
];
}
public function jsonOptions()
{
return JSON_PRESERVE_ZERO_FRACTION;
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Illuminate\Tests\Integration\Http\Fixtures;
use Illuminate\Http\Resources\Json\JsonResource;
class PostResourceWithJsonOptionsAndTypeHints extends JsonResource
{
public function __construct(Post $resource)
{
parent::__construct($resource);
}
public function toArray($request)
{
return [
'id' => $this->id,
'title' => $this->title,
'reading_time' => $this->reading_time,
];
}
public function jsonOptions()
{
return JSON_PRESERVE_ZERO_FRACTION;
}
}
Function Calls
| None |
Stats
| MD5 | 025e98ab2ed363ce7a3e19461dc34d52 |
| Eval Count | 0 |
| Decode Time | 80 ms |