Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PHP 7.1.0
function getNumber(): int {
return 6;
}
// Returns an integer so all is well
function getNumber(): int {
return 'six';
}
// Returns a string, will throw an error when called
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.