&reftitle.examples;
Many examples exist within the Reflection documentation, typically
within the __construct documentation for each class.
Reflection Example from Shell (a Terminal)
&example.outputs.similar;
function strlen ] {
- Parameters [1] {
Parameter #0 [ $str ]
}
}
Class [ class finfo ] {
- Constants [0] {
}
- Static properties [0] {
}
- Static methods [0] {
}
- Properties [0] {
}
- Methods [4] {
Method [ public method finfo ] {
- Parameters [2] {
Parameter #0 [ $options ]
Parameter #1 [ $arg ]
}
}
Method [ public method set_flags ] {
- Parameters [1] {
Parameter #0 [ $options ]
}
}
Method [ public method file ] {
- Parameters [3] {
Parameter #0 [ $filename ]
Parameter #1 [ $options ]
Parameter #2 [ $context ]
}
}
Method [ public method buffer ] {
- Parameters [3] {
Parameter #0 [ $string ]
Parameter #1 [ $options ]
Parameter #2 [ $context ]
}
}
}
}
Extension [ extension #23 json version 1.2.1 ] {
- Constants [10] {
Constant [ integer JSON_HEX_TAG ] { 1 }
Constant [ integer JSON_HEX_AMP ] { 2 }
Constant [ integer JSON_HEX_APOS ] { 4 }
Constant [ integer JSON_HEX_QUOT ] { 8 }
Constant [ integer JSON_FORCE_OBJECT ] { 16 }
Constant [ integer JSON_ERROR_NONE ] { 0 }
Constant [ integer JSON_ERROR_DEPTH ] { 1 }
Constant [ integer JSON_ERROR_STATE_MISMATCH ] { 2 }
Constant [ integer JSON_ERROR_CTRL_CHAR ] { 3 }
Constant [ integer JSON_ERROR_SYNTAX ] { 4 }
}
- Functions {
Function [ function json_encode ] {
- Parameters [2] {
Parameter #0 [ $value ]
Parameter #1 [ $options ]
}
}
Function [ function json_decode ] {
- Parameters [3] {
Parameter #0 [ $json ]
Parameter #1 [ $assoc ]
Parameter #2 [ $depth ]
}
}
Function [ function json_last_error ] {
- Parameters [0] {
}
}
}
}
dom
DOM/XML => enabled
DOM/XML API Version => 20031129
libxml Version => 2.7.3
HTML Support => enabled
XPath Support => enabled
XPointer Support => enabled
Schema Support => enabled
RelaxNG Support => enabled
]]>