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 /** * @link https://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Soft..

Decoded Output download

<?php
/**
 * @link https://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license https://www.yiiframework.com/license/
 */

namespace yiiunit\dataalidators\models;

use yiiase\Model;

class ValidatorTestEachAndInlineMethodModel extends Model
{
    public $arrayProperty = [true, false];

    public function rules()
    {
        return [
            ['arrayProperty', 'each', 'rule' => [function ($attribute, $params, $validator) {
                if (is_array($this->$attribute)) {
                    $this->addError($attribute, 'Each & Inline validators bug');
                }
            }]],
        ];
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php
/**
 * @link https://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license https://www.yiiframework.com/license/
 */

namespace yiiunit\data\validators\models;

use yii\base\Model;

class ValidatorTestEachAndInlineMethodModel extends Model
{
    public $arrayProperty = [true, false];

    public function rules()
    {
        return [
            ['arrayProperty', 'each', 'rule' => [function ($attribute, $params, $validator) {
                if (is_array($this->$attribute)) {
                    $this->addError($attribute, 'Each & Inline validators bug');
                }
            }]],
        ];
    }
}

Function Calls

None

Variables

None

Stats

MD5 0efc5e8abb3793fc9c8e13a49f3d17e6
Eval Count 0
Decode Time 127 ms