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); namespace Tests\Unit\BasicMigrations; use Illuminate\Dat..

Decoded Output download

<?php

declare(strict_types=1);

namespace Tests\Unit\BasicMigrations;

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddEmailToUsersTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        if (Schema::hasTable('users') === false) {
            return;
        }

        Schema::table('users', static function (Blueprint $table) {
            if (Schema::hasColumn('users', 'email') === false) {
                $table->string('email')->unique();
            }
        });
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace Tests\Unit\BasicMigrations;

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddEmailToUsersTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        if (Schema::hasTable('users') === false) {
            return;
        }

        Schema::table('users', static function (Blueprint $table) {
            if (Schema::hasColumn('users', 'email') === false) {
                $table->string('email')->unique();
            }
        });
    }
}

Function Calls

None

Variables

None

Stats

MD5 250459dfc8b4f4378231bbaf2f4119a4
Eval Count 0
Decode Time 112 ms