rfc:allow-void-variance

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
rfc:allow-void-variance [2019/02/04 06:39]
wesnetmo
rfc:allow-void-variance [2019/02/04 07:48] (current)
wesnetmo
Line 48: Line 48:
 The ''​method()''​ can return anything, or nothing at all, but ''​myFooConsumer''​ just does not care about it. The ''​method()''​ can return anything, or nothing at all, but ''​myFooConsumer''​ just does not care about it.
  
-For this reason adding a type to ''​void''​ in subclasses is not an invalid operation, and denying it is a pointless restriction. Changing from ''​void''​ to something else is very probably a bad idea, but PHP should not enforce ''​void''​ in subclasses just on that basis.+For this reason adding a type to ''​void''​ in subclasses is not an invalid operation, and denying it is a pointless restriction. Changing from ''​void''​ to something else is probably a bad idea, but PHP should not enforce ''​void''​ in subclasses just on that basis.
  
 ===== Proposal ===== ===== Proposal =====
rfc/allow-void-variance.txt · Last modified: 2019/02/04 07:48 by wesnetmo