Return types

This is a pull request to implement the return type RFC: https://wiki.php.net/rfc/returntypehinting

Notes about the implementation:

  - Adds a new opcode `ZEND_VERIFY_RETURN_TYPE`. When a function has a return type, this opcode will be emitted to check that the return value satisfies the return type.
  - When a class method uses return types, the class is no longer early bound. This is because the covariance checks must be done at runtime when the return types are objects. Presently any return type will remove the early binding.
  - `class_uses_return_types` loops through all the methods to see if any of them have a return type; there should probably be a flag on the class entry that is enabled whenever a return type is used instead of looping all the time.
  - Internal classes cannot specify return types, at least not easily.
  - During `pass_two` if a `ZEND_VERIFY_RETURN_TYPE` opcode is found in a `Generator` then it will be made into a no-op. It would be nicer to not emit one for generators, but this is somewhat difficult to do because when you process the `return` expression you may not know if the function is a generator yet.
I suspect that the contents of your link have changed and no longer points at what you intended, or perhaps I just don't see what the connection is. Could you explain this more?