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 /** * Copyright (c) 2017-present, Facebook, Inc. * All rights reserved. * * This..

Decoded Output download

<?php
/**
 * Copyright (c) 2017-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the license found in the
 * LICENSE file in the root directory of this source tree.
 */
namespace Facebook\InstantArticles\Utils;

use Facebook\InstantArticles\Validators\Type;

class Warning
{
    private $exception;
    private $message;
    private $context;

    public function __construct($message, $context = null, $exception = null)
    {
        $this->message = $message;
        $this->context = $context;
        $this->exception = $exception;
    }

    public function __toString()
    {
        $finalMessage = $this->message;

        if ($this->context !== null) {
            $finalMessage = $finalMessage."\nObject in the context: ".Type::stringify($this->context);
        }

        if ($this->exception) {
            $finalMessage = $finalMessage."\nException cause: ".Type::stringify($this->exception);
        }

        return $finalMessage;
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php
/**
 * Copyright (c) 2017-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the license found in the
 * LICENSE file in the root directory of this source tree.
 */
namespace Facebook\InstantArticles\Utils;

use Facebook\InstantArticles\Validators\Type;

class Warning
{
    private $exception;
    private $message;
    private $context;

    public function __construct($message, $context = null, $exception = null)
    {
        $this->message = $message;
        $this->context = $context;
        $this->exception = $exception;
    }

    public function __toString()
    {
        $finalMessage = $this->message;

        if ($this->context !== null) {
            $finalMessage = $finalMessage."\nObject in the context: ".Type::stringify($this->context);
        }

        if ($this->exception) {
            $finalMessage = $finalMessage."\nException cause: ".Type::stringify($this->exception);
        }

        return $finalMessage;
    }
}

Function Calls

None

Variables

None

Stats

MD5 4f2124267376dc7bca13ba55208cb46e
Eval Count 0
Decode Time 118 ms