`number` type But frankly this seems a bit silly and reminds me too much of JavaScript.
On Wed, Sep 28, 2022, 9:08 PM Hamza Ahmad <office.hamzaah...@gmail.com> wrote: > Hi Olle, > > I appreciate your idea of introducing a similar concept of typedef. > What if you write an RFC explaining that concept. I can join you > however in co-authoring this request. > > Seriously, I have had issues with writing such type again and again. > If you look at mixed type, it is indeed an alias of some union types. > Adding such an option to userland would lead to introduction of > various type hints. Plus, it will help devs write short hand aliases > for their intersection types. > > Regards > > Ahmad > > > On 9/27/22, Olle Härstedt <olleharst...@gmail.com> wrote: > >>Hello, internals! > >> > >>What do you think about creating shorthand `number` for `int|float`? > > > > This is also related to allow all types of type-hints in the > use-statement, > > like > > > > use int|float as numeric; > > > > Anyone interested in creating an RFC for this? > > > > Olle > > > > PS. Original thread here: https://externals.io/message/112209#112209 > > (dunno how to respond to an old thread when I don't have the original > > message) > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: https://www.php.net/unsub.php > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > >