diff --git a/language/functions.xml b/language/functions.xml index a5ff99d522..016e0ea0ef 100644 --- a/language/functions.xml +++ b/language/functions.xml @@ -1040,7 +1040,10 @@ $newref =& returns_reference(); Strict typing also has an effect on return type declarations. In the default weak mode, returned values will be coerced to the correct type if they are not - already of that type. In strong mode, the returned value must be of the + already of that type. If this type conversion is not allowed + (e.g. when returning an &array; from a function with return type &integer;), + a TypeError will be thrown. + In strict mode, the returned value must be of the correct type, otherwise a TypeError will be thrown.