Changes between Version 2 and Version 3 of Ticket #51525, comment 8
- Timestamp:
- 10/20/2020 12:01:10 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #51525, comment 8
v2 v3 1 1 Thanks @jrf, instead of answering your points one by one, let me try to put in words what I tried to put in code because I think there was some misunderstanding. 2 2 3 To be honest, I'm afraid the direction this ticket is taking lands to now where, and that is for the "single type" principle that is being self-imposed.3 To be honest, I'm afraid the direction this ticket is taking lands to nowhere, and that is for the "single type" principle that is being self-imposed. 4 4 5 5 First: this does not play well with PHP: a variable can be more than one type. An array or a string both can also be callable. And the concept of "single type" is completely not applicable to objects: `object` is pretty much useless as it guarantees exactly zero safety. … … 132 132 {{{#!php 133 133 <?php 134 /** @var int $post_id */135 134 add_filter( 'hook', fn(int|string|float $id) => related_id( $id ) ); 136 135 }}}