CallStackGet()

Returns the context (stacktrace) of the current position.

CallStackGet( type=string, offset=number, maxFrames=number );

Returns: any

Argument Description Default
type
string, optional

the type of the returned value, possible values are:

  • array
  • string
  • html
  • json

array

offset
number, optional

the number of frames to skip, default is 0

Introduced: 5.3.8.130

0

maxFrames
number, optional

the maximum number of frames to return, default is 0 which means all

Introduced: 5.3.8.130

0

Examples

dump(var=CallStackGet(type="json"), label="json ");
dump(var=CallStackGet(type="json", offset=2), label="json with offset");
dump(var=CallStackGet(type="json", maxframes=2), label="json with maxFrames");

dump(var=CallStackGet("string"), label="string"); dump(var=CallStackGet("array"), label="array"); dump(var=CallStackGet("html"), label="html");

See also