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




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.



A PHPlot-defined name for the callback. See Section 4.4.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.


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.

Refer to Section 4.4, “Callbacks” for more information on callbacks.


This function and the callbacks implementation were added in PHPlot-5.0.4 as an experimental feature. Callbacks were first documented in this manual as of PHPlot-5.0.5 and are no longer considered experimental. Logo

This version of the manual was produced for the PHPlot Sourceforge project web service site, which requires the logo on each page.

To download a logo-free copy of the manual, see the PHPlot project downloads area.