Stackdriver Debugger Client - Class Variable (1.4.16)

Reference documentation and code samples for the Stackdriver Debugger Client class Variable.

Represents a variable or an argument possibly of a compound object type.

Example:

use Google\Cloud\Debugger\Variable;

$variable = new Variable('myVar', 'string', ['value' => 'some value']);

Methods

__construct

Instantiate a new Variable

Parameters
NameDescription
name string

Name of the variable, if any.

type string

Variable type (e.g. MyClass).

options array

Variable options

↳ value string

Simple value of the variable.

↳ varTableIndex int

The index of this variable in the variable table.

↳ members Variable[]

Any public member variables.

↳ status Status

Status associated with the variable.

fromJson

Load a Variable from JSON form

Example:

$variable = Variable::fromJson([
    'name' => 'myVar',
    'type' => 'string',
    'value' => 'some value'
]);
Parameters
NameDescription
data array

Variable data.

↳ name string

Name of the variable, if any.

↳ value string

Simple value of the variable.

↳ type string

Variable type (e.g. MyClass).

↳ varTableIndex int

The index of this variable in the variable table.

↳ members array

Any public member variables.

↳ status array

Status associated with the variable.

Returns
TypeDescription
Google\Cloud\Debugger\Variable

byteSize

Return the approximate size of this object in bytes

Returns
TypeDescription
int

fullByteSize

Returns the approximate size of this object including all members in bytes

Returns
TypeDescription
int

info

Return a serializable version of this object

Returns
TypeDescription
array