Debugger/src/Variable.php
public static function fromJson(array $data)
    {
        if (array_key_exists('members', $data)) {
            $data['members'] = array_map([static::class, 'fromJson'], $data['members']);
        }
        if (array_key_exists('status', $data)) {
            $data['status'] = StatusMessage::fromJson($data['status']);
        }
        return new static($data['name'], $data['type'], $data);
    }
public static function fromJson(array $data)
    {
        if (array_key_exists('members', $data)) {
            $data['members'] = array_map([static::class, 'fromJson'], $data['members']);
        }
        if (array_key_exists('status', $data)) {
            $data['status'] = StatusMessage::fromJson($data['status']);
        }
        return new static($data['name'], $data['type'], $data);
    }
public static function fromJson ( array $ data ) { if ( array_key_exists ( 'members' , $ data ) ) { $ data [ 'members' ] = array_map ( [ static :: class , 'fromJson' ] , $ data [ 'members' ] ) ; } if ( array_key_exists ( 'status' , $ data ) ) { $ data [ 'status' ] = StatusMessage :: fromJson ( $ data [ 'status' ] ) ; } return new static ( $ data [ 'name' ] , $ data [ 'type' ] , $ data ) ; }
Load a Variable from JSON form

Example:
```
$variable = Variable::fromJson([
'name' => 'myVar',
'type' => 'string',
'value' => 'some value'
]);
```

@access private
@param array $data {
Variable data.

@type string $name Name of the variable, if any.
@type string $value Simple value of the variable.
@type string $type Variable type (e.g. MyClass).
@type int $varTableIndex The index of this variable in the variable
table.
@type array $members Any public member variables.
@type array $status Status associated with the variable.
}
@return Variable
Load a Variable from JSON form