GetCallback
Prev | PHPlot Function Reference | Next

## GetCallback

GetCallback — Returns the current callback function registered for the given reason

## Synopsis

    $plot->GetCallback($reason)

## Description

`GetCallback` returns the current callback function registered for the given reason. That is, it returns the function argument value used when a callback function was registered with SetCallback.

## Parameters

`$reason`

  A PHPlot-defined name for the callback. See Section 4.3.3, “Available Callbacks”.

## Return Value

Returns the function name as a string, or a 2-element array for object instance and method calls. Returns False if there is no callback registered for this reason, or if the given reason is not valid.

## Notes

Since no valid function name (or array of object instance and method) evaluates to false when directly tested, it is not necessary to check using the identical-to (===) operator.

Callbacks are an experimental feature added to PHPlot-5.0.4. Refer to Section 4.3, “Callbacks” for more information.

Prev | Up | Next
DrawGraph | Home | GetDeviceXY