diff --git a/language/functions.xml b/language/functions.xml index 2d4fb6c9f4..8f39f34cc0 100644 --- a/language/functions.xml +++ b/language/functions.xml @@ -366,8 +366,8 @@ Making a bowl of acidophilus raspberry. - Type declarations allow functions to require that parameters are of a - certain type at call time. If the given value is of the incorrect type, + Type declarations allow functions to specify parameters as certain types. + If the given value is of the incorrect type, then an error is generated: in PHP 5, this will be a recoverable fatal error, while PHP 7 will throw a TypeError exception. @@ -453,6 +453,35 @@ Making a bowl of acidophilus raspberry. + + + + Aliases for the above scalar types are not supported. Instead, they are + treated as class or interface names. For example, using + boolean as a parameter or return type will require + an argument or return value that is an &instanceof; the class or + interface boolean, rather than of type + bool: + + + + + + ]]> + + &example.outputs; + + + + + +