Declare types explicity to variables #9
jhonatanjacinto
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
@jhonatanjacinto, thanks for your kind words! This idea has been discussed a few times in the past: It is currently not being worked on. But it might be worth investigating for feasibility. Meanwhile, there are some userland hacks to achieve this goal: Also, I'm wondering if you use any static analysis tools right now? How much of a benefit would it be compared to annotating the variables with PHPDoc |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @pronskiy , how are you doing?
I watched your presentation in Laracon EU 2024 and you mentioned this page where we could throw some ideas for discussion here. So, here it is one: is there any intention or on going work regarding defining types explicitly for variables?
The support for types in the language have been increasing along the years, so I was wondering if that would spread out to variables as well at some point like:
If there's no work on this kind of feature, I would like to know your thoughts (and also the community thoughts) about it. Do you think it is useful? Desirable? Problematic?
Great presentation, btw!
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions