View Mdoc internals of Lib1

Branch function

Array ( [f3param] => Array ( [source] => Array ( [comment] => /** * A method example with 3 parameters. * * The three parameters have different declaration patterns. * * @experimental * @param (string) $p1 the first parameter * @param (int) $p2 the second parameter * @param (bool) $p3 the 3rd parameter * @return (void) */ [code] => function f3param($p1, $p2, $p3 = true) { // Print the 3 parameters echo $p1 . "\n"; echo $p2 . "\n"; echo $p3 . "\n"; return true; } [line] => 74 [return_type] => void [parameters] => string p1, int p2 [, bool p3] ) [description] => Array ( [short] => A method example with 3 parameters. [long] => The three parameters have different declaration patterns. ) [param] => Array ( [p1] => Array ( [type] => string [default] => [reference] => [description] => the first parameter ) [p2] => Array ( [type] => int [default] => [reference] => [description] => the second parameter ) [p3] => Array ( [type] => bool [default] => true [reference] => [description] => the 3rd parameter ) ) [return] => Array ( [0] => Array ( [type] => void [description] => ) ) [info] => Array ( [experimental] => yes ) ) [fpbyref] => Array ( [source] => Array ( [comment] => /** * A method with parameters passed by reference. * * This comment line is to avoid the notice in log. * @warning unstable * @param (string) $p1 the 1st parameter * @param (bool) $p2 the 2nd parameter * has a two-line comment * @return (string) the function result */ [code] => function fpbyref(& $p1, &$p2) { // No comment! return $p1; } [line] => 94 [return_type] => string [parameters] => string p1, bool p2 ) [description] => Array ( [short] => A method with parameters passed by reference. [long] => This comment line is to avoid the notice in log. ) [param] => Array ( [p1] => Array ( [type] => string [default] => [reference] => yes [description] => the 1st parameter ) [p2] => Array ( [type] => bool [default] => [reference] => yes [description] => the 2nd parameter has a two-line comment ) ) [return] => Array ( [0] => Array ( [type] => string [description] => the function result ) ) [info] => Array ( [warning] => unstable ) ) [flotdesc] => Array ( [source] => Array ( [comment] => /** * A method with a lot of description and @info items. * * Long description of func3 method is spread onto * three * lines. * * @warning unstable * @forfun one line, * two lines. * @param (int) $p1 the first parameter * @param (mixed) $p2 the title of text (string) * or false (bool) to get all * @param (string) $p3 the third parameter * is commented onto * three lines * @param (array) $p4 the a structured list: * 'name' => a name * 'address' => an address * 'city' => a city name * @return (void) if echo flag $p1 is true * a line of comment to test parsing * (string) the printable solution if echo flag is false (default) */ [code] => function flotdesc($p1, $p2="a string", $p3 = "another string", $p4) { if ($p1) { return; } else { return "whatever"; } [line] => 124 [return_type] => mixed [parameters] => int p1 [, mixed p2 [, string p3, array p4]] ) [description] => Array ( [short] => A method with a lot of description and @info items. [long] => Long description of func3 method is spread onto three lines. ) [param] => Array ( [p1] => Array ( [type] => int [default] => [reference] => [description] => the first parameter ) [p2] => Array ( [type] => mixed [default] => "a string" [reference] => [description] => the title of text (string) or false (bool) to get all ) [p3] => Array ( [type] => string [default] => "another string" [reference] => [description] => the third parameter is commented onto three lines ) [p4] => Array ( [type] => array [default] => [reference] => [description] => the a structured list: 'name' => a name 'address' => an address 'city' => a city name ) ) [return] => Array ( [0] => Array ( [type] => void [description] => if echo flag $p1 is true a line of comment to test parsing ) [1] => Array ( [type] => string [description] => the printable solution if echo flag is false (default) ) ) [info] => Array ( [warning] => unstable [forfun] => one line, two lines. ) ) )