Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #51525, comment 8


Ignore:
Timestamp:
10/20/2020 12:01:10 PM (4 years ago)
Author:
giuseppe.mazzapica
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #51525, comment 8

    v2 v3  
    11Thanks @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.
    22
    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.
     3To 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.
    44
    55First: 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.
     
    132132{{{#!php
    133133<?php
    134 /** @var int $post_id */
    135134add_filter( 'hook', fn(int|string|float $id) => related_id( $id ) );
    136135}}}