Return types

// Basic return type declaration
function sum($a, $b): float {/\*...\*/}
function get\_item(): string {/\*...\*/}
class C {}
// Returning an object
function getC(): C { return new C; }
Comments