Skip to content

Instantly share code, notes, and snippets.

@danielpataki
Created November 23, 2016 20:01
Show Gist options
  • Save danielpataki/1faa95815f3e0dc32de9e8798087fd20 to your computer and use it in GitHub Desktop.
Save danielpataki/1faa95815f3e0dc32de9e8798087fd20 to your computer and use it in GitHub Desktop.
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