Core Function FunctionInfo

From Sputnik Wiki
Jump to: navigation, search
FunctionInfo( <function-name> )

Contents

Description

Get a vast amount of *behind the scene* information on a function.

function-name

The function name to get information on.

Return Value

Success: Returns an array of information.

Failure: Returns null.

Remarks

More information will be added as time goes by but the array should remain in same format and provide the same info in future versions so it should be safe to rely on it.

Example

// make a function
Function cat($cat = "dog", &$dog, $fox)
{
}
 
// Print information about the function
printr FunctionInfo('cat');
 
// PRINTS
// Array
// (
//     [Id] => cat
//     [IdOrig] => cat
//     [ParamCount] => 3
//     [Params] => Array
//         (
//             [0] => Array
//                 (
//                     [Type] => SV
//                     [HasObjectId] => false
//                     [HasDefault] => true
//                     [Name] => cat
//                 )
//             [1] => Array
//                 (
//                     [Type] => REF SV
//                     [HasObjectId] => false
//                     [HasDefault] => false
//                     [Name] => dog
//                 )
//             [2] => Array
//                 (
//                     [Type] => SV
//                     [HasObjectId] => false
//                     [HasDefault] => false
//                     [Name] => fox
//                 )
//         )
//     [UseArgVariable] => false
//     [ReturnType] => 0
//     [Scope] => Public
//     [IsAbstract] => false
//     [IsOverride] => false
//     [AddOnce] => false
//     [RuleCount] => 0
//     [Rules] => Array
//         (
//         )
// )
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox